mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
refactor(api): 🏷️ Port all /api/v1/accounts to use new schemas
Some checks failed
Mirror to Codeberg / Mirror (push) Failing after 0s
Some checks failed
Mirror to Codeberg / Mirror (push) Failing after 0s
This commit is contained in:
parent
a0ce18337a
commit
e3e285571e
44 changed files with 840 additions and 475 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue