Huge rework to more modern code

This commit is contained in:
nemunaire 2022-09-04 21:45:39 +02:00
commit 4fcf12dff2
8 changed files with 288 additions and 174 deletions

View file

@ -4,6 +4,8 @@ import (
"io"
)
const VERSION = 0.3
var ApiVersionRouting = map[string]struct {
AuthFunction
DispatchFunction
@ -12,7 +14,7 @@ var ApiVersionRouting = map[string]struct {
}
func showVersion(u *User, args []string, body io.ReadCloser) (interface{}, error) {
m := map[string]interface{}{"version": 0.2}
m := map[string]interface{}{"version": VERSION}
if u != nil {
m["youare"] = *u