mirror of https://github.com/kern/filepizza
checkpoint
parent
9f1317496c
commit
2d0465731b
@ -1,6 +1,5 @@
|
|||||||
/// <reference types="next" />
|
/// <reference types="next" />
|
||||||
/// <reference types="next/image-types/global" />
|
/// <reference types="next/image-types/global" />
|
||||||
/// <reference types="next/navigation-types/compat/navigation" />
|
|
||||||
|
|
||||||
// NOTE: This file should not be edited
|
// NOTE: This file should not be edited
|
||||||
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
|
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
|
||||||
|
|||||||
@ -1,10 +0,0 @@
|
|||||||
import { NextApiRequest, NextApiResponse } from 'next'
|
|
||||||
import { Channel, channelRepo } from '../../channel'
|
|
||||||
import { routeHandler, getBodyKey } from '../../routes'
|
|
||||||
|
|
||||||
export default routeHandler<Channel>(
|
|
||||||
(req: NextApiRequest, _res: NextApiResponse): Promise<Channel> => {
|
|
||||||
const uploaderPeerID = getBodyKey(req, 'uploaderPeerID')
|
|
||||||
return channelRepo.create(uploaderPeerID)
|
|
||||||
},
|
|
||||||
)
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
import { NextApiRequest, NextApiResponse } from 'next'
|
|
||||||
import { channelRepo } from '../../channel'
|
|
||||||
import { routeHandler, getBodyKey } from '../../routes'
|
|
||||||
|
|
||||||
export default routeHandler<void>(
|
|
||||||
(req: NextApiRequest, _res: NextApiResponse): Promise<void> => {
|
|
||||||
const slug = getBodyKey(req, 'slug')
|
|
||||||
return channelRepo.destroy(slug)
|
|
||||||
},
|
|
||||||
)
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
import { NextApiRequest, NextApiResponse } from 'next'
|
|
||||||
import { channelRepo } from '../../channel'
|
|
||||||
import { routeHandler, getBodyKey } from '../../routes'
|
|
||||||
|
|
||||||
export default routeHandler<boolean>(
|
|
||||||
async (req: NextApiRequest, _res: NextApiResponse): Promise<boolean> => {
|
|
||||||
const slug = getBodyKey(req, 'slug')
|
|
||||||
await channelRepo.renew(slug)
|
|
||||||
return true
|
|
||||||
},
|
|
||||||
)
|
|
||||||
Loading…
Reference in New Issue