mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +01:00
fix: styling
This commit is contained in:
parent
96f2514fc5
commit
c4da3e89c5
@ -14,6 +14,7 @@ interface ISplashBody {
|
|||||||
|
|
||||||
class UserSplashController extends Controller {
|
class UserSplashController extends Controller {
|
||||||
private logger: Logger;
|
private logger: Logger;
|
||||||
|
|
||||||
private userSplashService: UserSplashService;
|
private userSplashService: UserSplashService;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
|
@ -63,14 +63,15 @@ class UserController extends Controller {
|
|||||||
const feedback = await this.userFeedbackService.getAllUserFeedback(
|
const feedback = await this.userFeedbackService.getAllUserFeedback(
|
||||||
user,
|
user,
|
||||||
);
|
);
|
||||||
const splash = await this.userSplashService.getAllUserSplashs(
|
const splash = await this.userSplashService.getAllUserSplashs(user);
|
||||||
user,
|
|
||||||
);
|
|
||||||
|
|
||||||
// TODO: remove this line after we remove it from db.
|
// TODO: remove this line after we remove it from db.
|
||||||
delete user.permissions;
|
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(
|
async updateUserPass(
|
||||||
|
@ -25,7 +25,6 @@ import { IFeatureToggleClientStore } from './stores/feature-toggle-client-store'
|
|||||||
import { IClientMetricsStoreV2 } from './stores/client-metrics-store-v2';
|
import { IClientMetricsStoreV2 } from './stores/client-metrics-store-v2';
|
||||||
import { IUserSplashStore } from './stores/user-splash-store';
|
import { IUserSplashStore } from './stores/user-splash-store';
|
||||||
|
|
||||||
|
|
||||||
export interface IUnleashStores {
|
export interface IUnleashStores {
|
||||||
accessStore: IAccessStore;
|
accessStore: IAccessStore;
|
||||||
addonStore: IAddonStore;
|
addonStore: IAddonStore;
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
exports.up = function (db, cb) {
|
exports.up = function (db, cb) {
|
||||||
db.runSql(
|
db.runSql(
|
||||||
`
|
`
|
||||||
ALTER TABLE user_splash DROP CONSTRAINT user_splash_user_id_fkey;
|
ALTER TABLE user_splash DROP CONSTRAINT user_splash_user_id_fkey;
|
||||||
ALTER TABLE user_splash
|
ALTER TABLE user_splash
|
||||||
ADD CONSTRAINT user_splash_user_id_fkey
|
ADD CONSTRAINT user_splash_user_id_fkey
|
||||||
FOREIGN KEY (user_id)
|
FOREIGN KEY (user_id)
|
||||||
REFERENCES users(id) ON DELETE CASCADE;
|
REFERENCES users(id) ON DELETE CASCADE;
|
||||||
`,
|
`,
|
||||||
cb,
|
cb,
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.down = function (db, cb) {
|
exports.down = function (db, cb) {
|
||||||
db.runSql('', cb);
|
db.runSql('', cb);
|
||||||
};
|
};
|
||||||
|
6
src/test/fixtures/fake-user-splash-store.ts
vendored
6
src/test/fixtures/fake-user-splash-store.ts
vendored
@ -2,7 +2,7 @@ import {
|
|||||||
IUserSplashKey,
|
IUserSplashKey,
|
||||||
IUserSplash,
|
IUserSplash,
|
||||||
IUserSplashStore,
|
IUserSplashStore,
|
||||||
} from '../../lib/types/stores/user-splash-store'
|
} from '../../lib/types/stores/user-splash-store';
|
||||||
|
|
||||||
export default class FakeUserSplashStore implements IUserSplashStore {
|
export default class FakeUserSplashStore implements IUserSplashStore {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// 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
|
// 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);
|
return Promise.resolve(undefined);
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
updateSplash(splash: IUserSplash): Promise<IUserSplash> {
|
updateSplash(splash: IUserSplash): Promise<IUserSplash> {
|
||||||
return Promise.resolve(undefined);
|
return Promise.resolve(undefined);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user