File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import Share.Web.Share.Webhooks.API qualified as Webhooks
1818import Share.Web.Support.API qualified as Support
1919import Share.Web.Types
2020import Share.Web.UCM.SyncV2.API qualified as SyncV2
21+ import Unison.Server.HistoryComments.API qualified as Unison.HistoryComments
2122import Unison.Share.API.Projects qualified as UCMProjects
2223import Unison.Sync.API qualified as Unison.Sync
2324
@@ -53,6 +54,7 @@ type API =
5354 -- This path is deprecated, but is still in use by existing clients.
5455 :<|> (" sync" :> MaybeAuthenticatedSession :> Unison.Sync. API )
5556 :<|> (" ucm" :> " v1" :> " sync" :> MaybeAuthenticatedSession :> Unison.Sync. API )
57+ :<|> (" ucm" :> " v1" :> " history-comments" :> MaybeAuthenticatedSession :> Unison.HistoryComments. API )
5658 :<|> (" ucm" :> " v1" :> " projects" :> MaybeAuthenticatedSession :> UCMProjects. ProjectsAPI )
5759 :<|> (" ucm" :> " v2" :> " sync" :> MaybeAuthenticatedUserId :> SyncV2. API )
5860 :<|> (" admin" :> Admin. API )
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ uploadHistoryCommentsStreamImpl mayCallerUserId br@(BranchRef branchRef) conn =
6767 branch <- MaybeT $ PGQ. branchByProjectBranchShortHand projectBranchSH
6868 contributorUser <- MaybeT $ for contributorHandle UserQ. userByHandle
6969 pure (project, branch, contributorUser)
70- (project, branch , contributorUser) <- maybe (handleErrInQueue q $ UploadCommentsProjectBranchNotFound br) pure $ mayInfo
70+ (project, _branch , contributorUser) <- maybe (handleErrInQueue q $ UploadCommentsProjectBranchNotFound br) pure $ mayInfo
7171 authZ <-
7272 lift (AuthZ. checkUploadToProjectBranchCodebase callerUserId project. projectId contributorUser. user_id) >>= \ case
7373 Left _authErr -> handleErrInQueue q (UploadCommentsNotAuthorized br)
You can’t perform that action at this time.
0 commit comments