Commit d0732590 authored by ibuler's avatar ibuler

[Update] 修改地址

parent ddf7a66b
...@@ -97,7 +97,7 @@ export class ElementAssetTreeComponent implements OnInit, OnDestroy { ...@@ -97,7 +97,7 @@ export class ElementAssetTreeComponent implements OnInit, OnDestroy {
if (this.isLoadTreeAsync) { if (this.isLoadTreeAsync) {
setting['async'] = { setting['async'] = {
enable: true, enable: true,
url: '/api/perms/v1/users/nodes/children-with-assets/tree/?cache_policy=1', url: '/api/v1/perms/users/nodes/children-with-assets/tree/?cache_policy=1',
autoParam: ['id=key', 'name=n', 'level=lv'], autoParam: ['id=key', 'name=n', 'level=lv'],
type: 'get' type: 'get'
}; };
......
...@@ -49,29 +49,29 @@ export class HttpService { ...@@ -49,29 +49,29 @@ export class HttpService {
} }
getUserProfile() { getUserProfile() {
return this.http.get<_User>('/api/users/v1/profile/'); return this.http.get<_User>('/api/v1/users/profile/');
} }
getMyGrantedAssets(keyword) { getMyGrantedAssets(keyword) {
const url = `/api/perms/v1/users/assets/tree/?search=${keyword}`; const url = `/api/v1/perms/users/assets/tree/?search=${keyword}`;
return this.http.get<Array<TreeNode>>(url); return this.http.get<Array<TreeNode>>(url);
} }
filterMyGrantedAssetsById(id: string) { filterMyGrantedAssetsById(id: string) {
const url = `/api/perms/v1/users/assets/tree/?id=${id}`; const url = `/api/v1/perms/users/assets/tree/?id=${id}`;
return this.http.get<Array<TreeNode>>(url); return this.http.get<Array<TreeNode>>(url);
} }
getMyGrantedNodes(async: boolean, refresh?: boolean) { getMyGrantedNodes(async: boolean, refresh?: boolean) {
const cachePolicy = refresh ? '2' : '1'; const cachePolicy = refresh ? '2' : '1';
const syncUrl = `/api/perms/v1/users/nodes-with-assets/tree/?cache_policy=${cachePolicy}`; const syncUrl = `/api/v1/perms/users/nodes-with-assets/tree/?cache_policy=${cachePolicy}`;
const asyncUrl = `/api/perms/v1/users/nodes/children-with-assets/tree/?cache_policy=${cachePolicy}`; const asyncUrl = `/api/v1/perms/users/nodes/children-with-assets/tree/?cache_policy=${cachePolicy}`;
const url = async ? asyncUrl : syncUrl; const url = async ? asyncUrl : syncUrl;
return this.http.get<Array<TreeNode>>(url); return this.http.get<Array<TreeNode>>(url);
} }
getMyGrantedRemoteApps(id?: string) { getMyGrantedRemoteApps(id?: string) {
let url = '/api/perms/v1/user/remote-apps/tree/'; let url = '/api/v1/perms/user/remote-apps/tree/';
if (id) { if (id) {
url += `?id=${id}&only=1`; url += `?id=${id}&only=1`;
} }
...@@ -189,7 +189,7 @@ export class HttpService { ...@@ -189,7 +189,7 @@ export class HttpService {
} }
getReplay(token: string) { getReplay(token: string) {
return this.http.get('/api/terminal/v1/sessions/' + token + '/replay'); return this.http.get('/api/v1/terminal/sessions/' + token + '/replay');
} }
// get_replay_json(token: string) { // get_replay_json(token: string) {
...@@ -204,7 +204,7 @@ export class HttpService { ...@@ -204,7 +204,7 @@ export class HttpService {
const params = new HttpParams() const params = new HttpParams()
.set('user-only', '1') .set('user-only', '1')
.set('token', token); .set('token', token);
return this.http.get('/api/users/v1/connection-token/', {params: params}); return this.http.get('/api/v1/users/connection-token/', {params: params});
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment