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