Rename methods to match HTTP requests
This commit is contained in:
@@ -2,7 +2,7 @@ import type { RequestEvent, RequestHandlerOutput } from '@sveltejs/kit'
|
||||
import { fetchAPI } from '$utils/api'
|
||||
import { getProduct } from '$utils/functions/swell'
|
||||
|
||||
export async function get({ params }: RequestEvent): Promise<RequestHandlerOutput> {
|
||||
export async function GET ({ params }: RequestEvent): Promise<RequestHandlerOutput> {
|
||||
try {
|
||||
// Get content from API
|
||||
const data = await fetchAPI(`
|
||||
|
||||
@@ -3,7 +3,7 @@ import { fetchAPI } from '$utils/api'
|
||||
import { getRandomItem } from '$utils/functions'
|
||||
import { getProduct } from '$utils/functions/swell'
|
||||
|
||||
export async function get({}: RequestEvent): Promise<RequestHandlerOutput> {
|
||||
export async function GET ({}: RequestEvent): Promise<RequestHandlerOutput> {
|
||||
try {
|
||||
// Get content from API
|
||||
const data = await fetchAPI(`
|
||||
|
||||
Reference in New Issue
Block a user