Too much things
This commit is contained in:
parent
d35bdca3b1
commit
f3a15b00e9
15 changed files with 640 additions and 17 deletions
17
admin/api_events.go
Normal file
17
admin/api_events.go
Normal file
|
@ -0,0 +1,17 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"srs.epita.fr/fic-server/libfic"
|
||||
)
|
||||
|
||||
var ApiEventsRouting = map[string]DispatchFunction{
|
||||
"GET": getEvents,
|
||||
}
|
||||
|
||||
func getEvents(args []string, body []byte) (interface{}, error) {
|
||||
if evts, err := fic.GetEvents(); err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
return evts, nil
|
||||
}
|
||||
}
|
Reference in a new issue