Reorganize directory structures

Signed-off-by: Sean Du <do4suki@gmail.com>
This commit is contained in:
2025-08-05 20:06:35 +08:00
parent d666470272
commit adf2a72630
2087 changed files with 637 additions and 603 deletions
+24
View File
@@ -0,0 +1,24 @@
package utils
import (
"encoding/base64"
"honoka-chan/pkg/db"
"honoka-chan/pkg/encrypt"
)
func CheckErr(err error) {
if err != nil {
panic(err)
}
}
func IsSigned(unitId int) bool {
exists, err := db.MainEng.Table("unit_sign_asset_m").Where("unit_id = ?", unitId).Exist()
CheckErr(err)
return exists
}
func GenXMS(resp []byte) string {
return base64.StdEncoding.EncodeToString(encrypt.RSASignSHA1(resp))
}