fix User type

This commit is contained in:
waveringana 2023-09-11 15:52:29 -04:00
parent fcf66a36e8
commit fbee7798ab
3 changed files with 10 additions and 6 deletions

View file

@ -126,7 +126,7 @@ function uploadFile(file) {
location.reload(); location.reload();
} }
else if (xhr.readyState == 4 && xhr.status != 200) { else if (xhr.readyState == 4 && xhr.status != 200) {
// Error. Inform the user alert(`Upload failed, error code: ${xhr.status}`)
} }
}); });

View file

@ -158,7 +158,7 @@ export type MediaParams = [
/**A row for the user database */ /**A row for the user database */
export interface UserRow { export interface UserRow {
id? : number, id? : number | string,
username: string, username: string,
hashed_password: any, hashed_password: any,
salt: any salt: any

View file

@ -2,8 +2,10 @@
declare global { declare global {
namespace Express { namespace Express {
interface User { interface User {
username: string; id? : number | string,
id?: string; username: string,
hashed_password?: any,
salt?: any
} }
} }
} }
@ -14,8 +16,10 @@ export function extension(str: string){
} }
/**Type for user data */ /**Type for user data */
export interface User { export interface User {
username: string; id? : number | string,
id?: string; username: string,
hashed_password?: any,
salt?: any
} }
export const videoExtensions = [".mp4", ".mov", ".avi", ".flv", ".mkv", ".wmv", ".webm"]; export const videoExtensions = [".mp4", ".mov", ".avi", ".flv", ".mkv", ".wmv", ".webm"];