Initial Implementation of Profile Pictures
This commit is contained in:
@@ -12,7 +12,7 @@ export const HttpError = t.iface([], {
|
||||
"timestamp": "string",
|
||||
});
|
||||
|
||||
const HttpErrorTI: t.ITypeSuite = {
|
||||
const exportedTypeSuite: t.ITypeSuite = {
|
||||
HttpError,
|
||||
};
|
||||
export default HttpErrorTI;
|
||||
export default exportedTypeSuite;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { createCheckers } from "ts-interface-checker";
|
||||
import HttpErrorTI from "./httpError.model-ti";
|
||||
import HttpError from "./httpError.model-ti";
|
||||
|
||||
const HttpErrorChecker = createCheckers(HttpErrorTI)['HttpError'];
|
||||
export default HttpErrorChecker;
|
||||
const HttpErrorChecker = createCheckers(HttpError)['HttpError'];
|
||||
export default HttpErrorChecker;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { createCheckers } from "ts-interface-checker";
|
||||
import TokenTI from "../token/token.model-ti";
|
||||
import UserTI from "./user.model-ti";
|
||||
import User from "./user.model-ti";
|
||||
import Token from "../token/token.model-ti";
|
||||
|
||||
const UserChecker = createCheckers(UserTI, TokenTI)['User'];
|
||||
export default UserChecker;
|
||||
const UserChecker = createCheckers(User, Token)['User'];
|
||||
export default UserChecker;
|
||||
|
||||
@@ -10,14 +10,13 @@ export const User = t.iface([], {
|
||||
"email": t.opt("string"),
|
||||
"username": "string",
|
||||
"password": t.opt("string"),
|
||||
"profilePictureUrl": t.opt("string"),
|
||||
"accessToken": t.opt("Token"),
|
||||
"refreshToken": t.opt("Token"),
|
||||
"authorities": t.opt(t.array(t.iface([], {
|
||||
"authority": "string",
|
||||
}))),
|
||||
"roles": t.opt(t.array("string")),
|
||||
});
|
||||
|
||||
const UserTI: t.ITypeSuite = {
|
||||
const exportedTypeSuite: t.ITypeSuite = {
|
||||
User,
|
||||
};
|
||||
export default UserTI;
|
||||
export default exportedTypeSuite;
|
||||
|
||||
@@ -6,8 +6,9 @@ export interface User {
|
||||
email?: string,
|
||||
username: string,
|
||||
password?: string,
|
||||
profilePictureUrl?: string,
|
||||
accessToken?: Token,
|
||||
refreshToken?: Token,
|
||||
authorities?: Array<{authority: string}>,
|
||||
roles?: Array<string>,
|
||||
validateAccessToken?: () => Token | undefined;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user