feat: user settings create subscription added and fixed typos
This commit is contained in:
parent
e40d77420c
commit
bc82e9c7fa
2 changed files with 11 additions and 2 deletions
|
|
@ -168,10 +168,10 @@ export const TEAM_ENVIRONMENT_NOT_TEAM_MEMBER =
|
|||
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)
|
||||
*/
|
||||
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
|
||||
|
|
|
|||
|
|
@ -58,6 +58,15 @@ export class UserSettingsResolver {
|
|||
|
||||
/* 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, {
|
||||
description: 'Listen for user setting updates',
|
||||
resolve: (value) => value,
|
||||
|
|
|
|||
Loading…
Reference in a new issue