mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
feat(api): create account delete endpoint (#50304)
* feat(api): create account delete endpoint --------- Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
+4
-2
@@ -18,7 +18,9 @@ const requests = {
|
||||
GET: (resource: string) => request(fastifyTestInstance?.server).get(resource),
|
||||
POST: (resource: string) =>
|
||||
request(fastifyTestInstance?.server).post(resource),
|
||||
PUT: (resource: string) => request(fastifyTestInstance?.server).put(resource)
|
||||
PUT: (resource: string) => request(fastifyTestInstance?.server).put(resource),
|
||||
DELETE: (resource: string) =>
|
||||
request(fastifyTestInstance?.server).delete(resource)
|
||||
};
|
||||
/* eslint-enable @typescript-eslint/naming-convention */
|
||||
|
||||
@@ -33,7 +35,7 @@ export const getCsrfToken = (setCookies: string[]): string | undefined => {
|
||||
export function superRequest(
|
||||
resource: string,
|
||||
config: {
|
||||
method: 'GET' | 'POST' | 'PUT';
|
||||
method: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
||||
setCookies?: string[];
|
||||
},
|
||||
options?: Options
|
||||
|
||||
Reference in New Issue
Block a user