mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-10 08:18:12 +03:00
feat: kshook settings
This commit is contained in:
@@ -997,6 +997,10 @@ const PRE_SCHEMAS = {
|
||||
),
|
||||
forceStaticImport: "boolean",
|
||||
}),
|
||||
"kshook-sv6c-settings": prSchemaFnWrap({
|
||||
userID: p.isPositiveNonZeroInteger,
|
||||
forceStaticImport: "boolean",
|
||||
}),
|
||||
users: prSchemaFnWrap({
|
||||
username: p.regex(/^[a-zA-Z_-][a-zA-Z0-9_-]{2,20}$/u),
|
||||
usernameLowercase: (self, parent) => self === (parent.username as string).toLowerCase(),
|
||||
|
||||
@@ -1308,6 +1308,7 @@ export type IRImportTypes =
|
||||
| "ir/direct-manual"
|
||||
| "ir/fervidex-static"
|
||||
| "ir/fervidex"
|
||||
| "ir/kshook-sv6c-static"
|
||||
| "ir/kshook-sv6c"
|
||||
| "ir/lr2hook"
|
||||
| "ir/usc";
|
||||
@@ -1552,6 +1553,11 @@ export interface FervidexSettingsDocument {
|
||||
forceStaticImport: boolean;
|
||||
}
|
||||
|
||||
export interface KsHookSettingsDocument {
|
||||
userID: integer;
|
||||
forceStaticImport: boolean;
|
||||
}
|
||||
|
||||
export interface OrphanChart<I extends IDStrings = IDStrings> {
|
||||
idString: I;
|
||||
chartDoc: ChartDocument<I>;
|
||||
|
||||
Vendored
+1
@@ -171,6 +171,7 @@ const db = {
|
||||
),
|
||||
|
||||
"fer-settings": monkDB.get<FervidexSettingsDocument>("fer-settings"),
|
||||
"kshook-sv6c-settings": monkDB.get<KsHookSettingsDocument>("kshook-sv6c-settings"),
|
||||
"orphan-chart-queue": monkDB.get<OrphanChart>("orphan-chart-queue"),
|
||||
"password-reset-codes": monkDB.get<{
|
||||
code: string;
|
||||
|
||||
Vendored
+1
@@ -90,6 +90,7 @@ const staticIndexes: Partial<Record<Databases, Array<Index>>> = {
|
||||
"user-settings": [index({ userID: 1 }, UNIQUE)],
|
||||
"user-private-information": [index({ userID: 1 }, UNIQUE), index({ email: 1 }, UNIQUE)],
|
||||
"fer-settings": [index({ userID: 1 }, UNIQUE)],
|
||||
"kshook-sv6c-settings": [index({ userID: 1 }, UNIQUE)],
|
||||
counters: [index({ counterName: 1 }, UNIQUE)],
|
||||
"class-achievements": [index({ game: 1, playtype: 1, timeAchieved: 1 })],
|
||||
"api-clients": [index({ clientID: 1 }, UNIQUE)],
|
||||
|
||||
Reference in New Issue
Block a user