Skip to content
Draft
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
10 changes: 10 additions & 0 deletions libs/wire-api/src/Wire/API/Routes/Public/Brig.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2125,6 +2125,16 @@ type AppsAPI =
:> Capture "uid" UserId
:> Get '[JSON] GetApp
)
:<|> Named
"delete-app"
( Summary "Delete app"
:> ZLocalUser
:> "teams"
:> Capture "tid" TeamId
:> "apps"
:> Capture "uid" UserId
:> MultiVerb1 'DELETE '[JSON] (RespondEmpty 200 "Invitation deleted")
)
:<|> Named
"refresh-app-cookie"
( Summary "Get a new app authentication token"
Expand Down
1 change: 1 addition & 0 deletions libs/wire-subsystems/src/Wire/AppSubsystem.hs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ appSubsystemErrorToHttpError =
data AppSubsystem m a where
CreateApp :: Local UserId -> TeamId -> Apps.NewApp -> AppSubsystem m Apps.CreatedApp
GetApp :: Local UserId -> TeamId -> UserId -> AppSubsystem m Apps.GetApp
DeleteApp :: Local UserId -> TeamId -> UserId -> AppSubsystem m ()
RefreshAppCookie ::
Local UserId ->
TeamId ->
Expand Down
4 changes: 4 additions & 0 deletions services/brig/src/Brig/API/Public.hs
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,7 @@ servantSitemap =
appsAPI =
Named @"create-app" createApp
:<|> Named @"get-app" getApp
:<|> Named @"delete-app" deleteApp
:<|> Named @"refresh-app-cookie" refreshAppCookie

---------------------------------------------------------------------------
Expand Down Expand Up @@ -1755,6 +1756,9 @@ createApp lusr tid new = lift . liftSem $ AppSubsystem.createApp lusr tid new
getApp :: (_) => Local UserId -> TeamId -> UserId -> Handler r GetApp
getApp lusr tid uid = lift . liftSem $ AppSubsystem.getApp lusr tid uid

deleteApp :: (_) => Local UserId -> TeamId -> UserId -> Handler r GetApp
deleteApp lusr tid uid = lift . liftSem $ AppSubsystem.deleteApp lusr tid uid

refreshAppCookie :: (_) => Local UserId -> TeamId -> UserId -> Handler r RefreshAppCookieResponse
refreshAppCookie lusr tid appId = do
mc <- lift . liftSem $ AppSubsystem.refreshAppCookie lusr tid appId
Expand Down