Implement per-project webhook secret

This commit is contained in:
simon987
2019-02-24 15:30:38 -05:00
parent c736cc3d98
commit 397805f915
22 changed files with 378 additions and 59 deletions

View File

@@ -3,6 +3,7 @@ package test
import (
"bytes"
"encoding/json"
"fmt"
"github.com/simon987/task_tracker/api"
"github.com/simon987/task_tracker/config"
"golang.org/x/net/publicsuffix"
@@ -177,3 +178,15 @@ func getSessionCtx(username string, password string, admin bool) *http.Client {
return client
}
func setRoleOnProject(req api.SetManagerRoleOnProjectRequest, pid int64, s *http.Client) (ar api.JsonResponse) {
r := Post(fmt.Sprintf("/manager/set_role_for_project/%d", pid), req, nil, s)
UnmarshalResponse(r, &ar)
return
}
func getAccountDetails(s *http.Client) (ar AccountAR) {
r := Get("/account", nil, s)
UnmarshalResponse(r, &ar)
return
}