Code cleanup

Signed-off-by: Yuan Si <do4suki@gmail.com>
This commit is contained in:
2023-05-08 22:15:54 +08:00
parent b1fd31c167
commit a45a67ff35
31 changed files with 447 additions and 1873 deletions
+5 -28
View File
@@ -5,43 +5,20 @@ import (
"encoding/json"
"fmt"
"honoka-chan/encrypt"
"honoka-chan/model"
"net/http"
"time"
"github.com/gin-gonic/gin"
)
type ProductResp struct {
ResponseData ProductData `json:"response_data"`
ReleaseInfo []interface{} `json:"release_info"`
StatusCode int `json:"status_code"`
}
type RestrictionInfo struct {
Restricted bool `json:"restricted"`
}
type UnderAgeInfo struct {
BirthSet bool `json:"birth_set"`
HasLimit bool `json:"has_limit"`
LimitAmount interface{} `json:"limit_amount"`
MonthUsed int `json:"month_used"`
}
type ProductData struct {
RestrictionInfo RestrictionInfo `json:"restriction_info"`
UnderAgeInfo UnderAgeInfo `json:"under_age_info"`
SnsProductList []interface{} `json:"sns_product_list"`
ProductList []interface{} `json:"product_list"`
SubscriptionList []interface{} `json:"subscription_list"`
ShowPointShop bool `json:"show_point_shop"`
ServerTimestamp int64 `json:"server_timestamp"`
}
func ProductList(ctx *gin.Context) {
prodReesp := ProductResp{
ResponseData: ProductData{
RestrictionInfo: RestrictionInfo{
prodReesp := model.ProductResp{
ResponseData: model.ProductRes{
RestrictionInfo: model.RestrictionInfo{
Restricted: false,
},
UnderAgeInfo: UnderAgeInfo{
UnderAgeInfo: model.UnderAgeInfo{
BirthSet: true,
HasLimit: false,
LimitAmount: nil,