Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F1262291
post.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
581 B
Referenced Files
None
Subscribers
None
post.ts
View Options
export
async
function
postTemplate
(
action_name
:
string
)
:
Promise
<
string
>
{
return
`import { Context } from "koa";
import { Mountable } from "@sealcode/sealgen";
import Router from "@koa/router";
export const actionName = "
${
action_name
}
";
export default new (class
${
action_name
}
Redirect extends Mountable {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
async canAccess(_: Context) {
return { canAccess: true, message: "" };
}
mount(router: Router, path: string) {
router.post(path, async (ctx) => {
ctx.body = { message: "OK!" }
});
}
})();
`
;
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Thu, Jan 23, 19:19 (19 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
599802
Default Alt Text
post.ts (581 B)
Attached To
Mode
rSGEN sealgen
Attached
Detach File
Event Timeline
Log In to Comment