Initial Commit

This commit is contained in:
Draculabo committed 2025-12-23 01:38:53 +08:00
commit d0417339c1
158 files changed
+31368

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
import { z } from "zod";
import { os } from "@orpc/server";
import {
backupAccount,
restoreAccount,
getCurrentAccountInfo,
} from "./handler";
import {
AccountBackupDataSchema,
AccountInfoSchema,
AccountSchema,
} from "../../types/account";
export const databaseRouter = os.router({
backupAccount: os
.input(AccountSchema)
.output(AccountBackupDataSchema)
.handler(async ({ input }) => {
return backupAccount(input);
}),
restoreAccount: os
.input(AccountBackupDataSchema)
.output(z.void())
.handler(async ({ input }) => {
restoreAccount(input);
}),
getCurrentAccountInfo: os.output(AccountInfoSchema).handler(async () => {
return getCurrentAccountInfo();
}),
});