experimental: initial autofix blast

This commit is contained in:
zkldi
2022-05-06 03:39:03 +01:00
parent 61ea7a4bf7
commit 0adc39b5cb
275 changed files with 2207 additions and 1877 deletions
+5 -5
View File
@@ -1,13 +1,13 @@
import db from "external/mongo/db";
import { APIPermissions } from "tachi-common";
import t from "tap";
import mockApi from "./mock-api";
import ResetDBState from "./resets";
import db from "external/mongo/db";
import t from "tap";
import type { APIPermissions } from "tachi-common";
export function RequireAuthPerms(
url: string,
perms: APIPermissions | APIPermissions[],
method: "GET" | "POST" | "PATCH" | "PUT" | "DELETE" = "GET"
perms: APIPermissions | Array<APIPermissions>,
method: "DELETE" | "GET" | "PATCH" | "POST" | "PUT" = "GET"
) {
t.test(`Testing permissions for ${method} ${url} [${perms}]`, async (t) => {
const m = method.toLowerCase() as Lowercase<typeof method>;