🎨 Update project structure

This commit is contained in:
2024-06-16 23:17:32 +08:00
parent 0695338fa1
commit 45048ea814
103 changed files with 138 additions and 40 deletions

View File

@@ -0,0 +1,15 @@
package services
import (
"git.solsynth.dev/hydrogen/passport/pkg/database"
"git.solsynth.dev/hydrogen/passport/pkg/models"
)
func GrantBadge(user models.Account, badge models.Badge) error {
badge.AccountID = user.ID
return database.C.Save(badge).Error
}
func RevokeBadge(badge models.Badge) error {
return database.C.Delete(&badge).Error
}