mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-08 14:15:25 +08:00
Revert "get whole api path from config"
This reverts commit 392f5f4c5f
.
This commit is contained in:
parent
392f5f4c5f
commit
8dc872f6b1
1 changed files with 4 additions and 4 deletions
|
@ -39,7 +39,7 @@ func (e *EmqxCloud) CreateEmqxUser(username, pass string) error {
|
|||
}
|
||||
data, _ := json.Marshal(payload)
|
||||
client := &http.Client{}
|
||||
req, err := http.NewRequest(http.MethodPost, fmt.Sprintf("%s/auth_username", e.URL), strings.NewReader(string(data)))
|
||||
req, err := http.NewRequest(http.MethodPost, fmt.Sprintf("%s/api/auth_username", e.URL), strings.NewReader(string(data)))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ func (e *EmqxCloud) CreateEmqxUserforServer() error {
|
|||
}
|
||||
data, _ := json.Marshal(payload)
|
||||
client := &http.Client{}
|
||||
req, err := http.NewRequest(http.MethodPost, fmt.Sprintf("%s/auth_username", e.URL), strings.NewReader(string(data)))
|
||||
req, err := http.NewRequest(http.MethodPost, fmt.Sprintf("%s/api/auth_username", e.URL), strings.NewReader(string(data)))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ func (e *EmqxCloud) createacls(acls []cloudAcl) error {
|
|||
return err
|
||||
}
|
||||
client := &http.Client{}
|
||||
req, err := http.NewRequest(http.MethodPost, fmt.Sprintf("%s/acl", e.URL), strings.NewReader(string(payload)))
|
||||
req, err := http.NewRequest(http.MethodPost, fmt.Sprintf("%s/api/acl", e.URL), strings.NewReader(string(payload)))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -246,7 +246,7 @@ func (e *EmqxCloud) GetUserACL(username string) (*aclObject, error) { return nil
|
|||
func (e *EmqxCloud) DeleteEmqxUser(username string) error {
|
||||
|
||||
client := &http.Client{}
|
||||
req, err := http.NewRequest(http.MethodDelete, fmt.Sprintf("%s/auth_username/%s", e.URL, username), nil)
|
||||
req, err := http.NewRequest(http.MethodDelete, fmt.Sprintf("%s/api/auth_username/%s", e.URL, username), nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue