refactor(api): 🏷️ Port all /api/v1/accounts to use new schemas
Some checks failed
Mirror to Codeberg / Mirror (push) Failing after 0s

This commit is contained in:
Jesse Wierzbinski 2025-02-13 01:31:15 +01:00
parent a0ce18337a
commit e3e285571e
No known key found for this signature in database
44 changed files with 840 additions and 475 deletions

View file

@ -30,7 +30,7 @@ describe("API Tests", () => {
// Now automatically mitigated by the server
/* test("try sending a request with a different origin", async () => {
if (new URL(config.http.base_url).protocol === "http:") {
if (config.http.base_url.protocol === "http:") {
return;
}

View file

@ -93,7 +93,7 @@ describe("API Tests", () => {
expect(account.fields).toEqual([]);
expect(account.source?.fields).toEqual([]);
expect(account.source?.privacy).toBe("public");
expect(account.source?.language).toBeNull();
expect(account.source?.language).toBe("en");
expect(account.source?.note).toBe("");
expect(account.source?.sensitive).toBe(false);
});

View file

@ -45,8 +45,8 @@ export const getTestUsers = async (
const password = randomString(32, "hex");
const user = await User.fromDataLocal({
username: `test-${randomString(32, "hex")}`,
email: `${randomString(32, "hex")}@test.com`,
username: `test-${randomString(8, "hex")}`,
email: `${randomString(16, "hex")}@test.com`,
password,
});