summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-11-06 15:31:40 +0100
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-11-06 15:31:52 +0100
commit57670b6f5a8e98c80670b0627bfad7dec7085f54 (patch)
treebd7b1bd2c8802d3f12361d9cf5ebfb31afb3b2ae
parentf1886fb200406a6433669649c4f2448904876ec2 (diff)
Update api routes name (plural nouns)
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
-rw-r--r--lib/agent/xdsserver.go6
-rw-r--r--webapp/src/app/services/xdsagent.service.ts6
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/agent/xdsserver.go b/lib/agent/xdsserver.go
index 37604b5..2037094 100644
--- a/lib/agent/xdsserver.go
+++ b/lib/agent/xdsserver.go
@@ -214,7 +214,7 @@ func (xs *XdsServer) GetFolders(folders *[]XdsFolderConfig) error {
// FolderAdd Send POST request to add a folder
func (xs *XdsServer) FolderAdd(fld *XdsFolderConfig, res interface{}) error {
- response, err := xs._HTTPPost("/folder", fld)
+ response, err := xs._HTTPPost("/folders", fld)
if err != nil {
return err
}
@@ -229,12 +229,12 @@ func (xs *XdsServer) FolderAdd(fld *XdsFolderConfig, res interface{}) error {
// FolderDelete Send DELETE request to delete a folder
func (xs *XdsServer) FolderDelete(id string) error {
- return xs.client.HTTPDelete("/folder/" + id)
+ return xs.client.HTTPDelete("/folders/" + id)
}
// FolderSync Send POST request to force synchronization of a folder
func (xs *XdsServer) FolderSync(id string) error {
- return xs.client.HTTPPost("/folder/sync/"+id, "")
+ return xs.client.HTTPPost("/folders/sync/"+id, "")
}
// SetAPIRouterGroup .
diff --git a/webapp/src/app/services/xdsagent.service.ts b/webapp/src/app/services/xdsagent.service.ts
index fd84ccb..2ea2d5d 100644
--- a/webapp/src/app/services/xdsagent.service.ts
+++ b/webapp/src/app/services/xdsagent.service.ts
@@ -285,15 +285,15 @@ export class XDSAgentService {
}
addProject(cfg: IXDSProjectConfig): Observable<IXDSProjectConfig> {
- return this._post('/project', cfg);
+ return this._post('/projects', cfg);
}
deleteProject(id: string): Observable<IXDSProjectConfig> {
- return this._delete('/project/' + id);
+ return this._delete('/projects/' + id);
}
syncProject(id: string): Observable<string> {
- return this._post('/project/sync/' + id, {});
+ return this._post('/projects/sync/' + id, {});
}
/***