♻️ Use the new dealer BaseUser and remove ExternalID

This commit is contained in:
2024-09-11 23:42:46 +08:00
parent aab0724653
commit a131a5bf86
20 changed files with 65 additions and 163 deletions

View File

@@ -4,6 +4,7 @@ import (
"errors"
"strings"
"git.solsynth.dev/hydrogen/dealer/pkg/hyper"
"git.solsynth.dev/hydrogen/interactive/pkg/internal/database"
"git.solsynth.dev/hydrogen/interactive/pkg/internal/models"
"gorm.io/gorm"
@@ -27,7 +28,7 @@ func GetCategory(alias string) (models.Category, error) {
func GetCategoryWithID(id uint) (models.Category, error) {
var category models.Category
if err := database.C.Where(models.Category{
BaseModel: models.BaseModel{ID: id},
BaseModel: hyper.BaseModel{ID: id},
}).First(&category).Error; err != nil {
return category, err
}