feat: add delete route

This commit is contained in:
2024-06-28 00:14:39 +08:00
parent c0a1460ad8
commit 60653a5ba8
16 changed files with 2760 additions and 200 deletions

View File

@@ -28,15 +28,17 @@ describe('RouterCodeModel', () => {
// yarn test --testNamePattern='RouterCodeModel:create'
test('RouterCodeModel:create', async () => {
try {
const demoCode = `async function run(ctx) {
ctx.body = 'test js';
return ctx;
}`;
const file = await RouterCodeModel.create({
path: 'demo',
key: 'returnDemo',
active: true,
project: 'default',
code: `async function run(ctx) {
ctx.body = 'test js';
return ctx;
}`,
code: demoCode,
exec: demoCode,
});
console.log('create success', file);
await sleep(2000);