feat: user settings create subscription added and fixed typos
This commit is contained in:
@@ -168,10 +168,10 @@ export const TEAM_ENVIRONMENT_NOT_TEAM_MEMBER =
|
|||||||
export const USER_SETTINGS_NOT_FOUND = 'user_settings/not_found' as const;
|
export const USER_SETTINGS_NOT_FOUND = 'user_settings/not_found' as const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* User setting not found for a user
|
* User setting already exists for a user
|
||||||
* (UserSettingsService)
|
* (UserSettingsService)
|
||||||
*/
|
*/
|
||||||
export const USER_SETTINGS_ALREADY_EXISTS = 'user_settings/settings_already_present' as const;
|
export const USER_SETTINGS_ALREADY_EXISTS = 'user_settings/settings_already_exists' as const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* User setting invalid (null) settings
|
* User setting invalid (null) settings
|
||||||
|
|||||||
@@ -58,6 +58,15 @@ export class UserSettingsResolver {
|
|||||||
|
|
||||||
/* Subscriptions */
|
/* Subscriptions */
|
||||||
|
|
||||||
|
@Subscription(() => UserSettings, {
|
||||||
|
description: 'Listen for user setting creates',
|
||||||
|
resolve: (value) => value,
|
||||||
|
})
|
||||||
|
@UseGuards(GqlAuthGuard)
|
||||||
|
userSettingsCreated(@GqlUser() user: User) {
|
||||||
|
return this.pubsub.asyncIterator(`user_settings/${user.uid}/created`);
|
||||||
|
}
|
||||||
|
|
||||||
@Subscription(() => UserSettings, {
|
@Subscription(() => UserSettings, {
|
||||||
description: 'Listen for user setting updates',
|
description: 'Listen for user setting updates',
|
||||||
resolve: (value) => value,
|
resolve: (value) => value,
|
||||||
|
|||||||
Reference in New Issue
Block a user