Skip to content

Commit

Permalink
gundeck: cleanup of deprecated code
Browse files Browse the repository at this point in the history
Follow-up from #549
  • Loading branch information
jschaul committed Nov 5, 2019
1 parent a6ed328 commit 7a6c114
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
14 changes: 0 additions & 14 deletions services/gundeck/src/Gundeck/API.hs
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ sitemap = do
returns (ref Model.pushTokenList)
response 200 "Object containing list of push tokens" end

post "/i/push" (continue Push.push) $
request .&. accept "application" "json"
-- TODO: REFACTOR: this end-point is probably noise, and should be dropped. @/i/push/v2@ does exactly
-- the same thing.

post "/i/push/v2" (continue Push.push) $
request .&. accept "application" "json"

Expand Down Expand Up @@ -143,15 +138,6 @@ sitemap = do

-- User-Client API -------------------------------------------------------

-- DEPRECATED: this is deprecated as of https://github.com/wireapp/wire-server/pull/549 (can be
-- removed once brig is deployed everywhere and won't trip over this missing any more.)
put "/i/clients/:cid" (continue Client.register) $
header "Z-User"
.&. param "cid"
.&. request
.&. contentType "application" "json"
.&. accept "application" "json"

delete "/i/clients/:cid" (continue Client.unregister) $
header "Z-User" .&. param "cid"

Expand Down
10 changes: 2 additions & 8 deletions services/gundeck/src/Gundeck/Client.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
module Gundeck.Client
( register
, unregister
( unregister
, removeUser
) where

Expand All @@ -10,17 +9,12 @@ import Data.Id
import Data.Predicate
import Gundeck.Monad
import Gundeck.Push.Native
import Gundeck.Util
import Network.Wai (Request, Response)
import Network.Wai (Response)
import Network.Wai.Utilities

import qualified Gundeck.Notification.Data as Notifications
import qualified Gundeck.Push.Data as Push

-- | DEPRECATED: remove once brig is upgraded everywhere.
register :: UserId ::: ClientId ::: Request ::: JSON ::: JSON -> Gundeck Response
register (_uid ::: _cid ::: _req ::: _) = return empty

unregister :: UserId ::: ClientId -> Gundeck Response
unregister (uid ::: cid) = do
toks <- filter byClient <$> Push.lookup uid Push.Quorum
Expand Down

0 comments on commit 7a6c114

Please sign in to comment.