Introduce account preferences to remember user's previous location (#4126)

This commit is contained in:
Apoorv Mishra
2022-09-18 18:31:47 +05:30
committed by GitHub
parent b68e58fad5
commit 6502b108e3
17 changed files with 156 additions and 12 deletions

View File

@@ -22,7 +22,11 @@ import {
AllowNull,
} from "sequelize-typescript";
import { languages } from "@shared/i18n";
import { CollectionPermission } from "@shared/types";
import {
CollectionPermission,
UserPreference,
UserPreferences,
} from "@shared/types";
import { stringToColor } from "@shared/utils/color";
import env from "@server/env";
import { ValidationError } from "../errors";
@@ -54,12 +58,6 @@ export enum UserRole {
Viewer = "viewer",
}
export enum UserPreference {
RememberLastPath = "rememberLastPath",
}
export type UserPreferences = { [key in UserPreference]?: boolean };
@Scopes(() => ({
withAuthentications: {
include: [