-
Notifications
You must be signed in to change notification settings - Fork 20
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
Showing
10 changed files
with
544 additions
and
0 deletions.
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
VITE_API_BASE_URL=REPLACE_ME |
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 { type Model } from "codeforlife/lib/esm/helpers/rtkQuery" | ||
|
||
import api from "." | ||
|
||
export type AuthFactor = Model< | ||
number, | ||
{ | ||
user: number | ||
type: "otp" | ||
} | ||
> | ||
|
||
const authFactorApi = api.injectEndpoints({ | ||
endpoints: build => ({}), | ||
}) | ||
|
||
export default authFactorApi | ||
export const {} = authFactorApi |
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,11 @@ | ||
import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react" | ||
|
||
const api = createApi({ | ||
baseQuery: fetchBaseQuery({ | ||
baseUrl: import.meta.env.VITE_API_BASE_URL, | ||
}), | ||
tagTypes: ["User", "Teacher", "Student", "School", "Class"], | ||
endpoints: () => ({}), | ||
}) | ||
|
||
export default api |
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,21 @@ | ||
import { type Model } from "codeforlife/lib/esm/helpers/rtkQuery" | ||
|
||
import api from "." | ||
|
||
export type Class = Model< | ||
string, | ||
{ | ||
name: string | ||
teacher: number | ||
school: number | ||
read_classmates_data: boolean | ||
receive_requests_until?: Date | ||
} | ||
> | ||
|
||
const classApi = api.injectEndpoints({ | ||
endpoints: build => ({}), | ||
}) | ||
|
||
export default classApi | ||
export const {} = classApi |
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,8 @@ | ||
import api from "." | ||
|
||
const otpBypassTokenApi = api.injectEndpoints({ | ||
endpoints: build => ({}), | ||
}) | ||
|
||
export default otpBypassTokenApi | ||
export const {} = otpBypassTokenApi |
Oops, something went wrong.