Skip to content

Commit

Permalink
Merge pull request #4 from zeripath/deps-api
Browse files Browse the repository at this point in the history
Deps api adjustments
  • Loading branch information
qwerty287 authored Mar 21, 2023
2 parents bac7eb6 + 1b1e755 commit b3ae625
Show file tree
Hide file tree
Showing 3 changed files with 171 additions and 122 deletions.
2 changes: 1 addition & 1 deletion models/issues/dependency.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func CreateIssueDependency(user *user_model.User, issue, dep *Issue) error {
}
defer committer.Close()

// Check if it aleready exists
// Check if it already exists
exists, err := issueDepExists(ctx, issue.ID, dep.ID)
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions routers/api/v1/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1027,8 +1027,8 @@ func Routes(ctx gocontext.Context) *web.Route {
}, mustEnableAttachments)
m.Combo("/dependencies").
Get(repo.GetIssueDependencies).
Post(reqToken(auth_model.AccessTokenScopeRepo), bind(api.IssueMeta{}), repo.CreateIssueDependency).
Delete(reqToken(auth_model.AccessTokenScopeRepo), bind(api.IssueMeta{}), repo.RemoveIssueDependency)
Post(reqToken(auth_model.AccessTokenScopeRepo), mustNotBeArchived, bind(api.IssueMeta{}), repo.CreateIssueDependency).
Delete(reqToken(auth_model.AccessTokenScopeRepo), mustNotBeArchived, bind(api.IssueMeta{}), repo.RemoveIssueDependency)
m.Combo("/blocks").
Get(repo.GetIssueBlocks).
Post(reqToken(auth_model.AccessTokenScopeRepo), bind(api.IssueMeta{}), repo.CreateIssueBlocking).
Expand Down
Loading

0 comments on commit b3ae625

Please sign in to comment.