20 lines
480 B
TypeScript
20 lines
480 B
TypeScript
|
|
import { SignInResponse } from '@/@types/auth'
|
||
|
|
import { ExtensibleObject } from '..'
|
||
|
|
|
||
|
|
export interface ProfileDto extends ExtensibleObject {
|
||
|
|
email: string
|
||
|
|
phoneNumber: string
|
||
|
|
name: string
|
||
|
|
surname: string
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface UpdateProfileDto {
|
||
|
|
name: string
|
||
|
|
surname: string
|
||
|
|
avatar?: File
|
||
|
|
}
|
||
|
|
|
||
|
|
export const isLoginSuccess = (data: unknown): data is SignInResponse => {
|
||
|
|
return typeof data === 'object' && data !== null && 'access_token' in data && !!data.access_token
|
||
|
|
}
|