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