Fix uploading to enabled/disabled source endpoints

This commit is contained in:
Eike Kettner
2020-08-09 09:21:23 +02:00
parent 6460315b2b
commit 098e4cf868
4 changed files with 8 additions and 8 deletions

View File

@ -83,8 +83,8 @@ object RSource {
sql.query[Int].unique.map(_ > 0)
}
def find(id: Ident): ConnectionIO[Option[RSource]] = {
val sql = selectSimple(all, table, sid.is(id))
def findEnabled(id: Ident): ConnectionIO[Option[RSource]] = {
val sql = selectSimple(all, table, and(sid.is(id), enabled.is(true)))
sql.query[RSource].option
}