mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
Fix file input click event in ThumbnailUpdate component
This commit is contained in:
parent
513d65704f
commit
f8ba29b015
5 changed files with 107 additions and 3 deletions
|
|
@ -75,6 +75,15 @@ export const errorHandling = (res: any) => {
|
|||
return res.json();
|
||||
};
|
||||
|
||||
export const getResponseMetadata = async (fetch_result: any) => {
|
||||
const json = await fetch_result.json();
|
||||
if (fetch_result.status === 200) {
|
||||
return { success: true, data: json, status: fetch_result.status, HTTPmessage: fetch_result.statusText };
|
||||
} else {
|
||||
return { success: false, data: json, status: fetch_result.status, HTTPmessage: fetch_result.statusText };
|
||||
}
|
||||
};
|
||||
|
||||
export const revalidateTags = async (tags: string[], orgslug: string) => {
|
||||
const url = getUriWithOrg(orgslug, "");
|
||||
tags.forEach((tag) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue