This commit is contained in:
Aritra Banik 2024-06-14 00:28:29 +05:30
parent b2bb2fef0c
commit 887a93cbfa

View file

@ -2,6 +2,7 @@ module main
import vweb
@['/controller/faculty'; post]
pub fn (mut app App) controller_get_faculty(email string, password string) vweb.Result {
response := app.service_get_faculty(email, password) or {
@ -34,5 +35,5 @@ pub fn (mut app App) controller_create_faculty(firstname string, lastname string
return app.text('error: ${err}')
}
app.set_status(201, '')
return app.text('faculty created')
return app.redirect('/faculty')
}