Rename methods to match HTTP requests
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type { RequestEvent, RequestHandlerOutput } from '@sveltejs/kit'
|
||||
import { fetchAPI } from '$utils/api'
|
||||
|
||||
export async function get({ params }: RequestEvent): Promise<RequestHandlerOutput> {
|
||||
export async function GET ({ params }: RequestEvent): Promise<RequestHandlerOutput> {
|
||||
try {
|
||||
// Get the first photo ID
|
||||
const firstPhoto = await fetchAPI(`
|
||||
|
||||
@@ -14,7 +14,7 @@ export const photoFields = `
|
||||
date_created
|
||||
`
|
||||
|
||||
export async function get({ params }: RequestEvent): Promise<RequestHandlerOutput> {
|
||||
export async function GET ({ params }: RequestEvent): Promise<RequestHandlerOutput> {
|
||||
try {
|
||||
const { location: slug } = params
|
||||
|
||||
|
||||
Reference in New Issue
Block a user