test: feedback updated on test script

This commit is contained in:
Mir Arif Hasan
2023-01-23 21:32:00 +06:00
parent bfac3f8ad0
commit 3cd9639f34
4 changed files with 21 additions and 28 deletions

View File

@@ -8,7 +8,7 @@ import { UserSettings } from './user-settings.model';
import {
USER_SETTINGS_ALREADY_EXISTS,
USER_SETTINGS_NULL_SETTINGS,
USER_SETTINGS_DATA_NOT_FOUND,
USER_SETTINGS_NOT_FOUND,
} from 'src/errors';
@Injectable()
@@ -36,7 +36,7 @@ export class UserSettingsService {
return E.right(settings);
} catch (e) {
return E.left(USER_SETTINGS_DATA_NOT_FOUND);
return E.left(USER_SETTINGS_NOT_FOUND);
}
}
@@ -65,7 +65,7 @@ export class UserSettingsService {
properties: JSON.stringify(userSettings.properties),
};
// Publish subscription for environment creation
// Publish subscription for user settings creation
await this.pubsub.publish(`user_settings/${user.uid}/created`, settings);
return E.right(settings);
@@ -99,12 +99,12 @@ export class UserSettingsService {
properties: JSON.stringify(updatedUserSettings.properties),
};
// Publish subscription for environment creation
// Publish subscription for user settings update
await this.pubsub.publish(`user_settings/${user.uid}/updated`, settings);
return E.right(settings);
} catch (e) {
return E.left(USER_SETTINGS_DATA_NOT_FOUND);
return E.left(USER_SETTINGS_NOT_FOUND);
}
}
}