feat: add initial add article command
This commit is contained in:
10
routes/api/articles/index.ts
Normal file
10
routes/api/articles/index.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { Handlers } from "$fresh/server.ts";
|
||||
import { getAllArticles } from "@lib/resource/articles.ts";
|
||||
import { json } from "@lib/helpers.ts";
|
||||
|
||||
export const handler: Handlers = {
|
||||
async GET() {
|
||||
const movies = await getAllArticles();
|
||||
return json(movies);
|
||||
},
|
||||
};
|
Reference in New Issue
Block a user