fix memory leak

This commit is contained in:
nek0 2017-01-02 13:26:02 +01:00
parent 4ba7944649
commit d33ced3d4a
3 changed files with 5 additions and 3 deletions

View file

@ -138,8 +138,10 @@ adminProfileForm owner = User
<*> pure (userSalted owner) <*> pure (userSalted owner)
<*> pure (userAlbums owner) <*> pure (userAlbums owner)
<*> areq boolField (bfs ("Admin" :: T.Text)) (Just $ userAdmin owner) <*> areq boolField (bfs ("Admin" :: T.Text)) (Just $ userAdmin owner)
<*> areq (selectField optionsEnum) (bfs ("Default licence" :: T.Text)) (Just $ userDefaultLicence owner) <*> areq (selectField licenses) (bfs ("Default licence" :: T.Text)) (Just $ userDefaultLicence owner)
<* bootstrapSubmit ("Change settings" :: BootstrapSubmit T.Text) <* bootstrapSubmit ("Change settings" :: BootstrapSubmit T.Text)
where
licenses = optionsPairs $ map (\a -> (T.pack (show (toEnum a :: Licence)), a)) [-2..6]
getAdminProfileDeleteR :: UserId -> Handler Html getAdminProfileDeleteR :: UserId -> Handler Html
getAdminProfileDeleteR ownerId = do getAdminProfileDeleteR ownerId = do

View file

@ -1,5 +1,5 @@
name: eidolon name: eidolon
version: 0.1.7.1 version: 0.1.7.2
synopsis: Image gallery in Yesod synopsis: Image gallery in Yesod
homepage: https://eidolon.nek0.eu homepage: https://eidolon.nek0.eu
license: AGPL-3 license: AGPL-3

View file

@ -4,7 +4,7 @@ $newline always
<h1>Profile Settings <h1>Profile Settings
^{adminProfileSetWidget} ^{adminProfileSetWidget}
<a href=@{AdminProfileDeleteR userId}>Delete user <a href=@{AdminProfileDeleteR ownerId}>Delete user
<div .item> <div .item>
<div class="inner"> <div class="inner">