Change the format to a list

This commit is contained in:
2021-01-01 07:55:10 +02:00
parent 98f732dbd2
commit e741d7fd59
3 changed files with 8 additions and 10 deletions

View File

@ -11,10 +11,6 @@ module Data.Buuka
)
where
import Data.Map
(Map)
import qualified Data.Map.Strict as M
import Database.Migrations
import Data.Aeson
@ -38,12 +34,12 @@ data BuukaEntry
instance SafeJSON BuukaEntry where
type Version BuukaEntry = 0
newtype Buuka = Buuka ( Map URL BuukaEntry )
newtype Buuka = Buuka [BuukaEntry]
deriving stock (Show, Eq)
deriving newtype (Semigroup, Monoid, FromJSON, ToJSON)
insert :: BuukaEntry -> Buuka -> Buuka
insert e (Buuka b) = Buuka (M.insert (url e) e b)
insert e (Buuka b) = Buuka (e : b)
instance SafeJSON Buuka where
type Version Buuka = 0