probably best to check username

This commit is contained in:
Brandon Thomas committed 2021-09-03 04:50:43 -04:00
1 parent a3ee3d0c8d
commit 5fe04dec5a
1 file changed
+2 -2
+2 -2
View File
@@ -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 {