本文整理匯總了TypeScript中kwyjibo.DocAction函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript DocAction函數的具體用法?TypeScript DocAction怎麽用?TypeScript DocAction使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了DocAction函數的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: oauth
@Get("/")
@DocAction(`Redirect to docker controller`)
oauth(context: Context): void {
context.response.redirect("/docker");
}
示例2: ping
@DocAction(`Responds "OK" when accessed.`)
ping(context: Context): Object {
return { response: "OK" };
}
示例3: echo
@Post()
@DocAction("Echoes the received body")
echo(context: Context): void {
context.response.send(context.request.body);
}
示例4: doSomething
@DocAction("Does something, only for dev")
doSomething(context: Context): Object {
return { result: "This can only be hit in dev" };
}
示例5: docs
@DocAction("Shows the app documentation")
docs(): string {
return K.getDocsAsHTML();
}
示例6: oauth
@Get("/callback")
@ActionMiddleware(App.authenticate)
@DocAction(`oAuth callback`)
oauth(context: Context): void {
context.response.redirect("/");
}