Move API fields to file
This commit is contained in:
@@ -1,20 +1,8 @@
|
||||
import { error } from '@sveltejs/kit'
|
||||
import type { PageServerLoad } from './$types'
|
||||
import { PUBLIC_LIST_AMOUNT } from '$env/static/public'
|
||||
import { fetchAPI } from '$utils/api'
|
||||
import { fetchAPI, photoFields } from '$utils/api'
|
||||
|
||||
export const photoFields = `
|
||||
title
|
||||
slug
|
||||
city
|
||||
image {
|
||||
id
|
||||
title
|
||||
width, height
|
||||
}
|
||||
date_taken
|
||||
date_created
|
||||
`
|
||||
|
||||
export const load: PageServerLoad = async ({ params }) => {
|
||||
try {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
import { quartOut } from '$animations/easings'
|
||||
import { getAssetUrlKey } from '$utils/api'
|
||||
import { DELAY } from '$utils/contants'
|
||||
import { photoFields } from './+page.server'
|
||||
import { photoFields } from '$utils/api'
|
||||
import { PUBLIC_LIST_INCREMENT } from '$env/static/public'
|
||||
// Components
|
||||
import Metas from '$components/Metas.svelte'
|
||||
|
||||
Reference in New Issue
Block a user