We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ce4181 commit 752e9c6Copy full SHA for 752e9c6
internal/sms-gateway/modules/settings/repository.go
@@ -11,7 +11,9 @@ type repository struct {
11
12
// GetSettings retrieves the device settings for a user by their userID.
13
func (r *repository) GetSettings(userID string) (*DeviceSettings, error) {
14
- settings := &DeviceSettings{}
+ settings := &DeviceSettings{
15
+ Settings: map[string]any{},
16
+ }
17
err := r.db.Where("user_id = ?", userID).Limit(1).Find(settings).Error
18
if err != nil {
19
return nil, err
0 commit comments