AuthUser as model
This commit is contained in:
@@ -2,12 +2,7 @@ import React, { createContext, useContext, useEffect, useState } from "react";
|
||||
import axios from "axios";
|
||||
import { tokenStore } from "./token";
|
||||
import { attachAuthInterceptors } from "./axios";
|
||||
|
||||
export interface AuthUser {
|
||||
_id: string;
|
||||
username: string;
|
||||
[key: string]: any;
|
||||
}
|
||||
import { AuthUser } from "./models";
|
||||
|
||||
interface AuthContextModel {
|
||||
currentUser: AuthUser | null;
|
||||
|
||||
11
auth/src/models.ts
Normal file
11
auth/src/models.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export interface AuthUser {
|
||||
// meta fields
|
||||
_id?: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
|
||||
// model fields
|
||||
username: string;
|
||||
email: string;
|
||||
is_active: boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user