Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup of deprecated code #894

Merged
merged 1 commit into from
Nov 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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