Add expired flag to share details

This commit is contained in:
eikek
2021-10-02 23:05:19 +02:00
parent c7d587bea4
commit 4ef9d6c3ff
3 changed files with 16 additions and 7 deletions

View File

@ -102,7 +102,11 @@ object RShare {
)
def findAllByCollective(cid: Ident): ConnectionIO[List[RShare]] =
Select(select(T.all), from(T), T.cid === cid).build.query[RShare].to[List]
Select(select(T.all), from(T), T.cid === cid)
.orderBy(T.publishedAt.desc)
.build
.query[RShare]
.to[List]
def deleteByIdAndCid(id: Ident, cid: Ident): ConnectionIO[Int] =
DML.delete(T, T.id === id && T.cid === cid)