Impl magic login logic && checkin logic

Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
2025-12-25 00:37:02 +08:00
parent cd2bcd597c
commit bd726f80ea
10 changed files with 54 additions and 15 deletions

View File

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