25 lines
524 B
Go
25 lines
524 B
Go
package profile
|
|
|
|
import (
|
|
profileapischema "honoka-chan/internal/schema/api/profile"
|
|
honokautils "honoka-chan/internal/utils"
|
|
"net/http"
|
|
"time"
|
|
)
|
|
|
|
func cardRanking() (res any, err error) {
|
|
cardRankingData, err := honokautils.LoadServerData[[]profileapischema.CardRankingData]("card_ranking_data.json")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
res = profileapischema.CardRankingResp{
|
|
Result: cardRankingData,
|
|
Status: http.StatusOK,
|
|
CommandNum: false,
|
|
TimeStamp: time.Now().Unix(),
|
|
}
|
|
|
|
return res, err
|
|
}
|