-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
18ca69a
commit 62bc0a5
Showing
5 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ src/assets/video/trial_video.mov | |
|
||
|
||
# local env files | ||
.env | ||
.env.local | ||
.env.*.local | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { httpClient } from "../client"; | ||
import { ISignUpBody, ISignUpRes } from "./Types"; | ||
|
||
const header = { "X-API-Key": import.meta.env.VITE_API_PUBLIC_KEY ?? "" }; | ||
|
||
export const signUp = (body: ISignUpBody) => | ||
new Promise((resolve: (value: ISignUpRes) => void, reject) => { | ||
httpClient | ||
.post("/oauth/signup", body, { | ||
headers: header, | ||
}) | ||
.then(({ data }) => { | ||
resolve(data); | ||
}) | ||
.catch((error) => { | ||
reject(error); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
type TTokenType = "Bearer" | "ID"; | ||
|
||
type TGrantType = "auth_code" | "verify_code"; | ||
|
||
export interface ISignUpRes { | ||
auth_code: string; | ||
access_token: string; | ||
token_type: TTokenType; | ||
} | ||
|
||
export interface ISignUpBody { | ||
email: string; | ||
grant_type: TGrantType; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import axios from "axios"; | ||
|
||
const baseURL = import.meta.env.VITE_API_URL; | ||
const httpClient = axios.create({ baseURL }); | ||
|
||
export { httpClient }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters