Update getPhoto action signatures
This commit is contained in:
parent
ac3b71142e
commit
33469a60ee
@ -58,12 +58,12 @@ export default function InfinitePhotoScroll({
|
||||
? getPhotosCachedAction(
|
||||
initialOffset + size * itemsPerPage,
|
||||
itemsPerPage,
|
||||
includeHiddenPhotos,
|
||||
includeHiddenPhotos ? 'include' : 'exclude',
|
||||
)
|
||||
: getPhotosAction(
|
||||
initialOffset + size * itemsPerPage,
|
||||
itemsPerPage,
|
||||
includeHiddenPhotos,
|
||||
includeHiddenPhotos ? 'include' : 'exclude',
|
||||
)
|
||||
, [useCachedPhotos, initialOffset, itemsPerPage, includeHiddenPhotos]);
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
'use server';
|
||||
|
||||
import {
|
||||
GetPhotosOptions,
|
||||
sqlDeletePhoto,
|
||||
sqlInsertPhoto,
|
||||
sqlDeletePhotoTagGlobally,
|
||||
@ -201,16 +202,16 @@ export const getImageBlurAction = async (url: string) =>
|
||||
export const getPhotosAction = async (
|
||||
offset: number,
|
||||
limit: number,
|
||||
includeHidden?: boolean,
|
||||
hidden?: GetPhotosOptions['hidden'],
|
||||
) =>
|
||||
getPhotos({ offset, includeHidden, limit });
|
||||
getPhotos({ offset, hidden, limit });
|
||||
|
||||
export const getPhotosCachedAction = async (
|
||||
offset: number,
|
||||
limit: number,
|
||||
includeHidden?: boolean,
|
||||
hidden?: GetPhotosOptions['hidden'],
|
||||
) =>
|
||||
getPhotosCachedCached({ offset, includeHidden, limit });
|
||||
getPhotosCachedCached({ offset, hidden, limit });
|
||||
|
||||
export const queryPhotosByTitleAction = async (query: string) =>
|
||||
(await getPhotos({ query, limit: 10 }))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user