Add jwt crypto module, support unit test for config module

Signed-off-by:  Asai Neko<sugar@sne.moe>
This commit is contained in:
2025-12-23 18:11:31 +08:00
parent 1505783c62
commit d314942c08
13 changed files with 212 additions and 11 deletions

View File

@@ -21,6 +21,13 @@ func (self *User) GetByEmail(email string) error {
return nil
}
func (self *User) GetByUserId(userId string) error {
if err := Database.Where("user_id = ?", userId).First(&self).Error; err != nil {
return err
}
return nil
}
func (self *User) SetCheckinState(email string, state bool) error {
if err := Database.Where("email = ?", email).First(&self).Error; err != nil {
return err