4.8.7 test (#2058)

* fix: query extension id;App page change type invalid

* prettier
This commit is contained in:
Archer
2024-07-16 16:55:12 +08:00
committed by GitHub
parent b5c98a4f63
commit ee7496467b
11 changed files with 109 additions and 101 deletions

View File

@@ -12,7 +12,10 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
const { binary, metadata } = await readMongoImg({ id });
res.setHeader('Content-Type', metadata?.mime ?? guessBase64ImageType(binary.toString('base64')));
res.setHeader(
'Content-Type',
metadata?.mime ?? guessBase64ImageType(binary.toString('base64'))
);
res.send(binary);
} catch (error) {
jsonRes(res, {

View File

@@ -79,21 +79,13 @@ const AppListContextProvider = ({ children }: { children: ReactNode }) => {
return [AppTypeEnum.folder, type];
})();
return getMyApps({ parentId, type: formatType, searchKey });
},
{
refreshOnWindowFocus: true,
refreshDeps: [parentId, type]
}
);
useThrottleEffect(
() => {
loadMyApps();
},
[searchKey],
{
wait: 500
manual: false,
refreshDeps: [searchKey, parentId, type],
throttleWait: 500,
refreshOnWindowFocus: true
}
);

View File

@@ -22,6 +22,10 @@ export function connectToDatabase() {
initGlobal();
},
afterHook: async () => {
if (global.systemInitd) return;
global.systemInitd = true;
systemStartCb();
//init system configinit vector databaseinit root user