fix: 🚨 Enable more Biome 2.0 rules
Some checks failed
CodeQL Scan / Analyze (javascript-typescript) (push) Failing after 4s
Build Docker Images / lint (push) Failing after 10s
Build Docker Images / check (push) Failing after 10s
Build Docker Images / tests (push) Failing after 6s
Deploy Docs to GitHub Pages / build (push) Failing after 0s
Build Docker Images / build (server, Dockerfile, ${{ github.repository_owner }}/server) (push) Has been skipped
Build Docker Images / build (worker, Worker.Dockerfile, ${{ github.repository_owner }}/worker) (push) Has been skipped
Deploy Docs to GitHub Pages / Deploy (push) Has been skipped
Mirror to Codeberg / Mirror (push) Failing after 0s
Nix Build / check (push) Failing after 0s

This commit is contained in:
Jesse Wierzbinski 2025-04-10 19:56:42 +02:00
parent 963173cdae
commit 1679585c4c
No known key found for this signature in database
21 changed files with 116 additions and 53 deletions

View file

@ -151,11 +151,9 @@ export class BaseClient {
if (this.accessToken) {
headers.set("Authorization", `Bearer ${this.accessToken}`);
}
if (body) {
if (!(body instanceof FormData)) {
headers.set("Content-Type", "application/json; charset=utf-8");
} // else: let FormData set the content type, as it knows best (boundary, etc.)
}
if (body && !(body instanceof FormData)) {
headers.set("Content-Type", "application/json; charset=utf-8");
} // else: let FormData set the content type, as it knows best (boundary, etc.)
for (const [key, value] of Object.entries(extra?.headers || {})) {
headers.set(key, value);

View file

@ -1229,10 +1229,8 @@ export class Client extends BaseClient {
): Promise<Output<z.infer<typeof Account>[]>> {
const params = new URLSearchParams();
if (options) {
if (options.limit) {
params.set("limit", options.limit.toString());
}
if (options?.limit) {
params.set("limit", options.limit.toString());
}
return this.get<z.infer<typeof Account>[]>(
@ -1449,10 +1447,8 @@ export class Client extends BaseClient {
): Promise<Output<z.infer<typeof Tag>[]>> {
const params = new URLSearchParams();
if (options) {
if (options.limit) {
params.set("limit", options.limit.toString());
}
if (options?.limit) {
params.set("limit", options.limit.toString());
}
return this.get<z.infer<typeof Tag>[]>(`/api/v1/trends?${params}`);
@ -1839,10 +1835,8 @@ export class Client extends BaseClient {
params.append("id[]", id);
}
if (options) {
if (options.with_suspended) {
params.set("with_suspended", "true");
}
if (options?.with_suspended) {
params.set("with_suspended", "true");
}
return this.get<z.infer<typeof Relationship>[]>(
@ -2121,10 +2115,8 @@ export class Client extends BaseClient {
): Promise<Output<z.infer<typeof Account>[]>> {
const params = new URLSearchParams();
if (options) {
if (options.limit) {
params.set("limit", options.limit.toString());
}
if (options?.limit) {
params.set("limit", options.limit.toString());
}
return this.get<z.infer<typeof Account>[]>(