mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: format with prettier
This commit is contained in:
parent
03fb09c3d6
commit
a147ad6610
164 changed files with 11257 additions and 8154 deletions
|
|
@ -1,26 +1,44 @@
|
|||
import { getAPIUrl } from "@services/config/config";
|
||||
import { RequestBody, getResponseMetadata } from "@services/utils/ts/requests";
|
||||
import { getAPIUrl } from '@services/config/config'
|
||||
import { RequestBody, getResponseMetadata } from '@services/utils/ts/requests'
|
||||
|
||||
export async function createInviteCode(org_id: any) {
|
||||
const result = await fetch(`${getAPIUrl()}orgs/${org_id}/invites`, RequestBody("POST", null, null));
|
||||
const res = await getResponseMetadata(result);
|
||||
return res;
|
||||
const result = await fetch(
|
||||
`${getAPIUrl()}orgs/${org_id}/invites`,
|
||||
RequestBody('POST', null, null)
|
||||
)
|
||||
const res = await getResponseMetadata(result)
|
||||
return res
|
||||
}
|
||||
|
||||
export async function deleteInviteCode(org_id: any, org_invite_code_uuid: string) {
|
||||
const result = await fetch(`${getAPIUrl()}orgs/${org_id}/invites/${org_invite_code_uuid}`, RequestBody("DELETE", null, null));
|
||||
const res = await getResponseMetadata(result);
|
||||
return res;
|
||||
export async function deleteInviteCode(
|
||||
org_id: any,
|
||||
org_invite_code_uuid: string
|
||||
) {
|
||||
const result = await fetch(
|
||||
`${getAPIUrl()}orgs/${org_id}/invites/${org_invite_code_uuid}`,
|
||||
RequestBody('DELETE', null, null)
|
||||
)
|
||||
const res = await getResponseMetadata(result)
|
||||
return res
|
||||
}
|
||||
|
||||
export async function changeSignupMechanism(org_id: any, signup_mechanism: string) {
|
||||
const result = await fetch(`${getAPIUrl()}orgs/${org_id}/signup_mechanism?signup_mechanism=${signup_mechanism}`, RequestBody("PUT", null, null));
|
||||
const res = await getResponseMetadata(result);
|
||||
return res;
|
||||
export async function changeSignupMechanism(
|
||||
org_id: any,
|
||||
signup_mechanism: string
|
||||
) {
|
||||
const result = await fetch(
|
||||
`${getAPIUrl()}orgs/${org_id}/signup_mechanism?signup_mechanism=${signup_mechanism}`,
|
||||
RequestBody('PUT', null, null)
|
||||
)
|
||||
const res = await getResponseMetadata(result)
|
||||
return res
|
||||
}
|
||||
|
||||
export async function validateInviteCode(org_id: any, invite_code: string) {
|
||||
const result = await fetch(`${getAPIUrl()}orgs/${org_id}/invites/code/${invite_code}`, RequestBody("GET", null, null));
|
||||
const res = await getResponseMetadata(result);
|
||||
return res;
|
||||
const result = await fetch(
|
||||
`${getAPIUrl()}orgs/${org_id}/invites/code/${invite_code}`,
|
||||
RequestBody('GET', null, null)
|
||||
)
|
||||
const res = await getResponseMetadata(result)
|
||||
return res
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue