2021-09-18 15:32:39 +02:00
|
|
|
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) {
|
2022-09-28 09:01:17 +02:00
|
|
|
err = Db().Where("id = ?", id).First(&result).Error
|
2021-09-18 15:32:39 +02:00
|
|
|
|
2022-09-28 09:01:17 +02:00
|
|
|
return result, err
|
2021-09-18 15:32:39 +02:00
|
|
|
}
|