jbilcke-hf HF staff commited on
Commit
e3cd957
β€’
1 Parent(s): e411e71

remove useless api

Browse files
src/app/api/tasks/[uuid]/route.ts DELETED
@@ -1,9 +0,0 @@
1
- import { NextRequest, NextResponse } from "next/server"
2
- import { getVideo } from "@/server"
3
-
4
- // TODO: implement some kind of quota system
5
- export async function GET(req: NextRequest) {
6
- return NextResponse.json({
7
- video: await getVideo(`${req.url?.split('/').pop() || ""}`)
8
- })
9
- }
 
 
 
 
 
 
 
 
 
 
src/app/api/tasks/route.ts DELETED
@@ -1,23 +0,0 @@
1
- import { Video, VideoRequest } from "@/app/types"
2
- import { getAllVideos, createNewVideo } from "@/server"
3
- import { NextApiResponse } from "next"
4
- import { NextRequest, NextResponse } from "next/server"
5
-
6
- // TODO: implement some kind of quota system
7
- export async function GET() {
8
- return NextResponse.json({
9
- videos: await getAllVideos()
10
- })
11
- }
12
-
13
- // TODO: implement some kind of quota system
14
- export async function POST(
15
- req: NextRequest,
16
- res: NextApiResponse<Video | {
17
- error?: string
18
- }>
19
- ) {
20
- const taskRequest = req.body as VideoRequest
21
- const task = await createNewVideo(taskRequest)
22
- res.status(200).json(task)
23
- }