Optimize photo edit network request
This commit is contained in:
parent
5f992788f2
commit
c94e641627
@ -22,20 +22,20 @@ export default async function PhotoEditPage({
|
||||
}) {
|
||||
const { photoId } = await params;
|
||||
|
||||
const photo = await getPhotoNoStore(photoId, true);
|
||||
|
||||
if (!photo) { redirect(PATH_ADMIN); }
|
||||
|
||||
const [
|
||||
photo,
|
||||
uniqueTags,
|
||||
uniqueRecipes,
|
||||
uniqueFilms,
|
||||
] = await Promise.all([
|
||||
getPhotoNoStore(photoId, true),
|
||||
getUniqueTagsCached(),
|
||||
getUniqueRecipesCached(),
|
||||
getUniqueFilmsCached(),
|
||||
]);
|
||||
|
||||
if (!photo) { redirect(PATH_ADMIN); }
|
||||
|
||||
const hasAiTextGeneration = AI_TEXT_GENERATION_ENABLED;
|
||||
|
||||
// Only generate image thumbnails when AI generation is enabled
|
||||
|
||||
Loading…
Reference in New Issue
Block a user