Last active
May 3, 2021 20:35
-
-
Save ktutnik/6609638158071d85aab4591e2e38d180 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { GenericController } from "@plumier/typeorm" | |
import { Context } from "koa" | |
export class ProductsController extends GenericController(Product) { | |
// override save method (POST /path) | |
save(data: Product, ctx: Context) { | |
// add your custom logic here | |
const result = super.save(data, ctx) | |
// add your custom logic here | |
return result | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment