photoprism/internal/query/account.go
2021-09-18 15:32:39 +02:00

15 lines
308 B
Go

package query
import (
"github.com/photoprism/photoprism/internal/entity"
)
// AccountByID finds an account by primary key.
func AccountByID(id uint) (result entity.Account, err error) {
if err := Db().Where("id = ?", id).First(&result).Error; err != nil {
return result, err
}
return result, nil
}