Skip to content

Commit

Permalink
storage/mariadb: fix created_at possibly being NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
Wessie committed May 16, 2024
1 parent 786fe39 commit 8407f4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions storage/mariadb/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ SELECT
users.ip AS ip,
users.updated_at AS updated_at,
users.deleted_at AS deleted_at,
users.created_at AS created_at,
IFNULL(users.created_at, TIMESTAMP('2010-10-10 10:10:10')) AS created_at,
group_concat(permissions.permission) AS userpermissions,
IFNULL(djs.id, 0) AS 'dj.id',
IFNULL(djs.regex, '') AS 'dj.regex',
Expand Down Expand Up @@ -414,7 +414,7 @@ func (us UserStorage) All() ([]radio.User, error) {
users.ip AS ip,
users.updated_at AS updated_at,
users.deleted_at AS deleted_at,
users.created_at AS created_at,
IFNULL(users.created_at, TIMESTAMP('2010-10-10 10:10:10')) AS created_at,
IFNULL(users.user, '') AS username,
(SELECT group_concat(permission) FROM permissions WHERE user_id=users.id) AS userpermissions,
IFNULL(djs.id, 0) AS 'dj.id',
Expand Down

0 comments on commit 8407f4b

Please sign in to comment.