nub media search results
This commit is contained in:
parent
ed3553eb13
commit
80274e0db2
2 changed files with 3 additions and 3 deletions
|
@ -20,7 +20,7 @@ import Import
|
|||
|
||||
import qualified Data.Text as T
|
||||
import Data.Maybe (fromJust)
|
||||
import Data.List (sortBy)
|
||||
import Data.List (sortBy, nub)
|
||||
|
||||
import Database.Persist.Sql (rawSql)
|
||||
|
||||
|
@ -37,7 +37,7 @@ getSearchR = do
|
|||
[PersistText query]
|
||||
b <- rawSql "select ?? from medium where ? % any(string_to_array(description, ' '))"
|
||||
[PersistText query]
|
||||
return $ sortBy (\ sa sb -> compare
|
||||
return $ nub $ sortBy (\ sa sb -> compare
|
||||
(T.unpack $ mediumTitle $ entityVal sa)
|
||||
(T.unpack $ mediumTitle $ entityVal sb))
|
||||
$ a ++ b
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name: eidolon
|
||||
version: 0.1.11.4
|
||||
version: 0.1.11.5
|
||||
synopsis: Image gallery in Yesod
|
||||
homepage: https://eidolon.nek0.eu
|
||||
license: AGPL-3
|
||||
|
|
Loading…
Reference in a new issue