fix User type
This commit is contained in:
parent
fcf66a36e8
commit
fbee7798ab
3 changed files with 10 additions and 6 deletions
|
@ -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}`)
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue