From 6624145609b9b961dbd135c2b31dc791c3d8acec Mon Sep 17 00:00:00 2001 From: oleksandrkhmil Date: Fri, 20 Dec 2024 16:40:23 +0200 Subject: [PATCH] fix: uint conv --- internal/db/seeders/user_seeder.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/db/seeders/user_seeder.go b/internal/db/seeders/user_seeder.go index 559ed8f..874864b 100644 --- a/internal/db/seeders/user_seeder.go +++ b/internal/db/seeders/user_seeder.go @@ -15,7 +15,7 @@ func NewUserSeeder(db *gorm.DB) *UserSeeder { } func (userSeeder *UserSeeder) SetUsers() { - users := map[int]map[string]string{ + users := map[uint]map[string]string{ 1: { "email": "user1@example.com", "name": "user1", @@ -33,7 +33,7 @@ func (userSeeder *UserSeeder) SetUsers() { userSeeder.DB.First(&user, key) if user.ID == 0 { - user.ID = uint(key) + user.ID = key user.Email = value["email"] user.Name = value["name"] user.Password = value["password"]