Add seperate type for dearrow warning

Also add dearrow warning reason as option for user info
This commit is contained in:
Ajay
2023-07-17 22:42:29 -04:00
parent 808066a5ed
commit e9fcf6b445
7 changed files with 31 additions and 7 deletions

View File

@@ -7,7 +7,7 @@ import { client } from "../utils/httpClient";
describe("postWarning", () => {
// constants
const endpoint = "/api/warnUser";
const getWarning = (userID: string) => db.prepare("get", `SELECT "userID", "issueTime", "issuerUserID", enabled, "reason" FROM warnings WHERE "userID" = ?`, [userID]);
const getWarning = (userID: string, type = 0) => db.prepare("get", `SELECT "userID", "issueTime", "issuerUserID", enabled, "reason" FROM warnings WHERE "userID" = ? AND "type" = ?`, [userID, type]);
const warneduserID = "warning-0";
const warnedUserPublicID = getHash(warneduserID);