mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-12 09:18:25 +03:00
fix typescript pnpm complaints (they're portable damnit)
This commit is contained in:
@@ -24,12 +24,14 @@ export async function CreateFakeAuthCookie(mockApi: supertest.SuperTest<supertes
|
||||
return res.headers["set-cookie"] as string[];
|
||||
}
|
||||
|
||||
export function InsertFakeTokenWithAllPerms(token: string) {
|
||||
return () =>
|
||||
db["api-tokens"].insert({
|
||||
export function InsertFakeTokenWithAllPerms(token: string): () => Promise<void> {
|
||||
// deliberately redundant async await to get typescript to shut up about pnpm
|
||||
return async () => {
|
||||
await db["api-tokens"].insert({
|
||||
userID: 1,
|
||||
identifier: "Mock API Token",
|
||||
permissions: AllPermissions,
|
||||
token,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user