Minor cleanup and fixes

Signed-off-by: Sean Du <do4suki@gmail.com>
This commit is contained in:
2026-06-05 06:53:48 +08:00
parent c4f1686abb
commit acd9be627e
48 changed files with 4279 additions and 4245 deletions
+14 -4
View File
@@ -1,13 +1,23 @@
package stamp
import (
"encoding/json"
"honoka-chan/pkg/utils"
stampapischema "honoka-chan/internal/schema/api/stamp"
honokautils "honoka-chan/internal/utils"
"time"
)
func stampInfo() (res any, err error) {
stampResp := utils.ReadAllText("assets/serverdata/stamp.json")
err = json.Unmarshal([]byte(stampResp), &res)
stampData, err := honokautils.LoadServerData[stampapischema.InfoData]("stamp_data.json")
if err != nil {
return nil, err
}
res = stampapischema.InfoResp{
Result: stampData,
Status: 200,
CommandNum: false,
TimeStamp: time.Now().Unix(),
}
return res, err
}