1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-04 00:18:01 +01:00

fix: styling

This commit is contained in:
Youssef 2021-11-09 20:55:23 +01:00
parent 96f2514fc5
commit c4da3e89c5
5 changed files with 15 additions and 14 deletions

View File

@ -14,6 +14,7 @@ interface ISplashBody {
class UserSplashController extends Controller {
private logger: Logger;
private userSplashService: UserSplashService;
constructor(

View File

@ -63,14 +63,15 @@ class UserController extends Controller {
const feedback = await this.userFeedbackService.getAllUserFeedback(
user,
);
const splash = await this.userSplashService.getAllUserSplashs(
user,
);
const splash = await this.userSplashService.getAllUserSplashs(user);
// TODO: remove this line after we remove it from db.
delete user.permissions;
return res.status(200).json({ user, permissions, feedback, splash }).end();
return res
.status(200)
.json({ user, permissions, feedback, splash })
.end();
}
async updateUserPass(

View File

@ -25,7 +25,6 @@ import { IFeatureToggleClientStore } from './stores/feature-toggle-client-store'
import { IClientMetricsStoreV2 } from './stores/client-metrics-store-v2';
import { IUserSplashStore } from './stores/user-splash-store';
export interface IUnleashStores {
accessStore: IAccessStore;
addonStore: IAddonStore;

View File

@ -1,16 +1,16 @@
exports.up = function (db, cb) {
db.runSql(
`
db.runSql(
`
ALTER TABLE user_splash DROP CONSTRAINT user_splash_user_id_fkey;
ALTER TABLE user_splash
ADD CONSTRAINT user_splash_user_id_fkey
FOREIGN KEY (user_id)
REFERENCES users(id) ON DELETE CASCADE;
`,
cb,
);
cb,
);
};
exports.down = function (db, cb) {
db.runSql('', cb);
db.runSql('', cb);
};

View File

@ -2,7 +2,7 @@ import {
IUserSplashKey,
IUserSplash,
IUserSplashStore,
} from '../../lib/types/stores/user-splash-store'
} from '../../lib/types/stores/user-splash-store';
export default class FakeUserSplashStore implements IUserSplashStore {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
@ -11,12 +11,12 @@ export default class FakeUserSplashStore implements IUserSplashStore {
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
getSplash(userId: number, splashId: string): Promise<IUserSplash> {
getSplash(userId: number, splashId: string): Promise<IUserSplash> {
return Promise.resolve(undefined);
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
updateSplash(splash: IUserSplash): Promise<IUserSplash> {
updateSplash(splash: IUserSplash): Promise<IUserSplash> {
return Promise.resolve(undefined);
}