mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
Media upload for avatars and banners, more work, fix tests
This commit is contained in:
parent
16cfd5d900
commit
460b68c381
17 changed files with 360 additions and 139 deletions
|
|
@ -38,11 +38,11 @@ export async function parseRequest<T>(request: Request): Promise<Partial<T>> {
|
|||
// If a file, set as a file
|
||||
if (value instanceof File) {
|
||||
data[key] = value;
|
||||
} else {
|
||||
// Otherwise, set as a string
|
||||
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
||||
data[key] = value.toString();
|
||||
}
|
||||
|
||||
// Otherwise, set as a string
|
||||
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
||||
data[key] = value.toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue