feat: 增加 pipeline和 deployment
This commit is contained in:
22
apps/server/controllers/pipeline/index.ts
Normal file
22
apps/server/controllers/pipeline/index.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import type { Context } from 'koa';
|
||||
import { Controller, Get, Post } from '../../decorators/route.ts';
|
||||
import prisma from '../../libs/db.ts';
|
||||
|
||||
@Controller('/pipelines')
|
||||
export class PipelineController {
|
||||
@Get('/:id')
|
||||
async get(ctx: Context) {
|
||||
const id = ctx.params.id;
|
||||
const pipeline = await prisma.pipeline.findUnique({
|
||||
where: {
|
||||
id: id,
|
||||
},
|
||||
});
|
||||
return pipeline;
|
||||
}
|
||||
|
||||
@Post('')
|
||||
async create(ctx: Context) {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user