35
This commit is contained in:
parent
b2bb2fef0c
commit
887a93cbfa
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@ module main
|
||||||
|
|
||||||
import vweb
|
import vweb
|
||||||
|
|
||||||
|
|
||||||
@['/controller/faculty'; post]
|
@['/controller/faculty'; post]
|
||||||
pub fn (mut app App) controller_get_faculty(email string, password string) vweb.Result {
|
pub fn (mut app App) controller_get_faculty(email string, password string) vweb.Result {
|
||||||
response := app.service_get_faculty(email, password) or {
|
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}')
|
return app.text('error: ${err}')
|
||||||
}
|
}
|
||||||
app.set_status(201, '')
|
app.set_status(201, '')
|
||||||
return app.text('faculty created')
|
return app.redirect('/faculty')
|
||||||
}
|
}
|
Loading…
Reference in a new issue