mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: disable revalidation for some fetches
This commit is contained in:
parent
2c0e4dc902
commit
0c5b66e0dc
5 changed files with 13 additions and 12 deletions
|
|
@ -19,7 +19,7 @@ export const RequestBody = (method: string, data: any, next: any) => {
|
|||
};
|
||||
|
||||
export const RequestBodyWithAuthHeader = (method: string, data: any, next: any, token: string) => {
|
||||
let HeadersConfig = new Headers({ Authorization: `Bearer ${token}` });
|
||||
let HeadersConfig = new Headers(token ? { "Content-Type": "application/json", Authorization: `Bearer ${token}` } : { "Content-Type": "application/json" });
|
||||
let options: any = {
|
||||
method: method,
|
||||
headers: HeadersConfig,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue