diff --git a/app/public/js/index.js b/app/public/js/index.js index 8fbbf66..c33ba4b 100644 --- a/app/public/js/index.js +++ b/app/public/js/index.js @@ -126,7 +126,7 @@ function uploadFile(file) { location.reload(); } else if (xhr.readyState == 4 && xhr.status != 200) { - // Error. Inform the user + alert(`Upload failed, error code: ${xhr.status}`) } }); diff --git a/app/types/db.ts b/app/types/db.ts index 2c53378..adc4ff9 100644 --- a/app/types/db.ts +++ b/app/types/db.ts @@ -158,7 +158,7 @@ export type MediaParams = [ /**A row for the user database */ export interface UserRow { - id? : number, + id? : number | string, username: string, hashed_password: any, salt: any diff --git a/app/types/lib.ts b/app/types/lib.ts index bff8c84..11c4e7b 100644 --- a/app/types/lib.ts +++ b/app/types/lib.ts @@ -2,8 +2,10 @@ declare global { namespace Express { interface User { - username: string; - id?: string; + id? : number | string, + username: string, + hashed_password?: any, + salt?: any } } } @@ -14,8 +16,10 @@ export function extension(str: string){ } /**Type for user data */ export interface User { - username: string; - id?: string; + id? : number | string, + username: string, + hashed_password?: any, + salt?: any } export const videoExtensions = [".mp4", ".mov", ".avi", ".flv", ".mkv", ".wmv", ".webm"];