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 { photoId } = await params;
|
||||||
|
|
||||||
const photo = await getPhotoNoStore(photoId, true);
|
|
||||||
|
|
||||||
if (!photo) { redirect(PATH_ADMIN); }
|
|
||||||
|
|
||||||
const [
|
const [
|
||||||
|
photo,
|
||||||
uniqueTags,
|
uniqueTags,
|
||||||
uniqueRecipes,
|
uniqueRecipes,
|
||||||
uniqueFilms,
|
uniqueFilms,
|
||||||
] = await Promise.all([
|
] = await Promise.all([
|
||||||
|
getPhotoNoStore(photoId, true),
|
||||||
getUniqueTagsCached(),
|
getUniqueTagsCached(),
|
||||||
getUniqueRecipesCached(),
|
getUniqueRecipesCached(),
|
||||||
getUniqueFilmsCached(),
|
getUniqueFilmsCached(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
if (!photo) { redirect(PATH_ADMIN); }
|
||||||
|
|
||||||
const hasAiTextGeneration = AI_TEXT_GENERATION_ENABLED;
|
const hasAiTextGeneration = AI_TEXT_GENERATION_ENABLED;
|
||||||
|
|
||||||
// Only generate image thumbnails when AI generation is enabled
|
// Only generate image thumbnails when AI generation is enabled
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user