mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 09:28:11 +00:00
probably best to check username
This commit is contained in:
1 parent
a3ee3d0c8d
commit
5fe04dec5a
1 file changed
+2
-2
@@ -47,11 +47,11 @@ export enum UserLookupError {
|
||||
export type GetUserByUsernameResponse = User | UserLookupError;
|
||||
|
||||
export function GetUserByUsernameIsOk(response: GetUserByUsernameResponse): response is User {
|
||||
return response.hasOwnProperty('user_token');
|
||||
return response.hasOwnProperty('username');
|
||||
}
|
||||
|
||||
export function GetUserByUsernameIsErr(response: GetUserByUsernameResponse): response is UserLookupError {
|
||||
return !response.hasOwnProperty('user_token');
|
||||
return !response.hasOwnProperty('username');
|
||||
}
|
||||
|
||||
interface ProfileResponsePayload {
|
||||
|
||||
Reference in new issue
Block a user