2021-09-18 15:32:39 +02:00
|
|
|
package query
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/photoprism/photoprism/internal/entity"
|
|
|
|
)
|
|
|
|
|
|
|
|
// AccountByID finds an account by primary key.
|
2022-10-15 21:54:11 +02:00
|
|
|
func AccountByID(id uint) (result entity.Service, 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
|
|
|
}
|