-
Notifications
You must be signed in to change notification settings - Fork 0
Create you first CRUD API
Olaf Erlandsen edited this page Jul 19, 2018
·
2 revisions
You can use the command line interface to create a new API Controller
twf add controller index index.html
@Api
export class IndexController extends Controller {
@HttpPost("/index.html")
public create () {
this.httpCreated();
}
@HttpGet("/index.html")
public read () {
this.httpOk();
}
@HttpPut("/index.html")
public update () {
this.httpOk();
}
@HttpDelete("/index.html")
public delete () {
this.httpOk();
}
}