mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-05 21:38:06 +03:00
Add contentiousContent support
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
|
||||
import db from "external/mongo/db";
|
||||
import MigrateRecords from "./migrate";
|
||||
import { DEFAULT_USER_SETTINGS } from "server/router/api/v1/auth/auth";
|
||||
|
||||
function ConvertFn(c: any) {
|
||||
return { userID: c.id, preferences: DEFAULT_USER_SETTINGS };
|
||||
}
|
||||
|
||||
(async () => {
|
||||
await MigrateRecords(db["user-settings"], "users", ConvertFn);
|
||||
|
||||
process.exit(0);
|
||||
})();
|
||||
@@ -30,7 +30,7 @@ function ConvertFn(c: any): PublicUserDocument {
|
||||
}
|
||||
|
||||
(async () => {
|
||||
await MigrateRecords(db, "users", ConvertFn);
|
||||
await MigrateRecords(db.users, "users", ConvertFn);
|
||||
|
||||
process.exit(0);
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user