device service getUserDevices

This commit is contained in:
Maksym Dudnik 2022-10-20 14:05:35 +03:00
parent d076917986
commit c82bcbafd7
2 changed files with 7 additions and 2 deletions

View File

@ -13,8 +13,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
const forwardUrl = "http://localhost:8080"; const forwardUrl = "https://thingsboard.cloud/";
const wsForwardUrl = "ws://localhost:8080"; const wsForwardUrl = "wss://thingsboard.cloud/";
const ruleNodeUiforwardUrl = forwardUrl; const ruleNodeUiforwardUrl = forwardUrl;
const PROXY_CONFIG = { const PROXY_CONFIG = {

View File

@ -42,6 +42,11 @@ export class DeviceService {
private http: HttpClient private http: HttpClient
) { } ) { }
public getUserDevices(pageLink: PageLink, type: string = '', config?: RequestConfig): Observable<PageData<Device>> {
return this.http.get<PageData<Device>>(`/api/user/devices${pageLink.toQuery()}&type=${type}`,
defaultHttpOptionsFromConfig(config));
}
public getTenantDeviceInfos(pageLink: PageLink, type: string = '', public getTenantDeviceInfos(pageLink: PageLink, type: string = '',
config?: RequestConfig): Observable<PageData<DeviceInfo>> { config?: RequestConfig): Observable<PageData<DeviceInfo>> {
return this.http.get<PageData<DeviceInfo>>(`/api/tenant/deviceInfos${pageLink.toQuery()}&type=${type}`, return this.http.get<PageData<DeviceInfo>>(`/api/tenant/deviceInfos${pageLink.toQuery()}&type=${type}`,