@@ -0,0 +1,17 @@
|
||||
package marathon
|
||||
|
||||
import (
|
||||
"honoka-chan/internal/schema/api/marathon"
|
||||
"time"
|
||||
)
|
||||
|
||||
func marathonInfo() (res any, err error) {
|
||||
res = marathon.InfoResp{
|
||||
Result: []any{},
|
||||
Status: 200,
|
||||
CommandNum: false,
|
||||
TimeStamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
return res, err
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package marathon
|
||||
|
||||
import "fmt"
|
||||
|
||||
func MarathonApi(action string) (res any, err error) {
|
||||
switch action {
|
||||
case "marathonInfo":
|
||||
res, err = marathonInfo()
|
||||
default:
|
||||
err = fmt.Errorf("unimplemented action: marathon: %s", action)
|
||||
}
|
||||
return res, err
|
||||
}
|
||||
Reference in New Issue
Block a user