Skip to content

Commit

Permalink
refactor(endpoints): 👽️ use RequestHandlerOutput instead
Browse files Browse the repository at this point in the history
  • Loading branch information
kwaa committed Mar 6, 2022
1 parent 43b7169 commit f734abd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/routes/atom.xml.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { EndpointOutput } from '@sveltejs/kit'
import type { RequestHandlerOutput } from '@sveltejs/kit'
import { site } from '$lib/config/site'
import { feed } from '$lib/config/misc'
import { icons } from '$lib/config/icons'
Expand Down Expand Up @@ -50,7 +50,7 @@ const render = async (): Promise<string> => {
</feed>`
}

export const get = async (): Promise<EndpointOutput> => ({
export const get = async (): Promise<RequestHandlerOutput> => ({
headers: {
'Content-Type': 'application/atom+xml; charset=utf-8'
},
Expand Down
4 changes: 2 additions & 2 deletions src/routes/manifest.webmanifest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { EndpointOutput } from '@sveltejs/kit'
import type { RequestHandlerOutput } from '@sveltejs/kit'
import { manifest } from '$lib/config/manifest'
import { toSnake } from '$lib/utils/case'

export const get = (): EndpointOutput => ({
export const get = (): RequestHandlerOutput => ({
headers: {
'Content-Type': 'application/manifest+json; charset=utf-8'
},
Expand Down
4 changes: 2 additions & 2 deletions src/routes/posts.json.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { EndpointOutput } from '@sveltejs/kit'
import type { RequestHandlerOutput } from '@sveltejs/kit'
import { genPosts } from '$lib/utils/posts'

export const get = async (): Promise<EndpointOutput> => ({
export const get = async (): Promise<RequestHandlerOutput> => ({
headers: {
'Content-Type': 'application/json; charset=utf-8'
},
Expand Down
4 changes: 2 additions & 2 deletions src/routes/sitemap.xml.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { EndpointOutput } from '@sveltejs/kit'
import type { RequestHandlerOutput } from '@sveltejs/kit'
import { site } from '$lib/config/site'
import { genPosts } from '$lib/utils/posts'

Expand All @@ -22,7 +22,7 @@ const render = async (): Promise<string> => `<?xml version='1.0' encoding='utf-8
.join('')}
</urlset>`

export const get = async (): Promise<EndpointOutput> => ({
export const get = async (): Promise<RequestHandlerOutput> => ({
headers: {
'Content-Type': 'application/xml; charset=utf-8'
},
Expand Down

0 comments on commit f734abd

Please sign in to comment.