Commit 4a3399e9 by Ryan McKinley Committed by GitHub

DataSourceWithBackend: resources response (#23411)

parent 938c6186
...@@ -104,14 +104,14 @@ export class DataSourceWithBackend< ...@@ -104,14 +104,14 @@ export class DataSourceWithBackend<
/** /**
* Make a GET request to the datasource resource path * Make a GET request to the datasource resource path
*/ */
async getResource(path: string, params?: any): Promise<Record<string, any>> { async getResource(path: string, params?: any): Promise<any> {
return getBackendSrv().get(`/api/datasources/${this.id}/resources/${path}`, params); return getBackendSrv().get(`/api/datasources/${this.id}/resources/${path}`, params);
} }
/** /**
* Send a POST request to the datasource resource path * Send a POST request to the datasource resource path
*/ */
async postResource(path: string, body?: any): Promise<Record<string, any>> { async postResource(path: string, body?: any): Promise<any> {
return getBackendSrv().post(`/api/datasources/${this.id}/resources/${path}`, { ...body }); return getBackendSrv().post(`/api/datasources/${this.id}/resources/${path}`, { ...body });
} }
......
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