mirror of
https://github.com/FJurmanovic/wallet-web.git
synced 2026-02-06 06:08:10 +00:00
added authorization stores and fixed http client
This commit is contained in:
@@ -2,21 +2,25 @@ import { attr, targets, controller, target } from "@github/catalyst";
|
||||
import { closest, index, update, isTrue } from "core/utils";
|
||||
import { html, render, until } from "@github/jtml";
|
||||
import { PingService } from "services/";
|
||||
import { AppMainElement } from "components/";
|
||||
|
||||
@controller
|
||||
class HomePageElement extends HTMLElement {
|
||||
private pingService: PingService;
|
||||
@closest appMain: AppMainElement;
|
||||
constructor() {
|
||||
super();
|
||||
this.pingService = new PingService();
|
||||
}
|
||||
@update
|
||||
connectedCallback() {}
|
||||
connectedCallback() {
|
||||
this.pingService = new PingService(this.appMain?.appService);
|
||||
this.getPong();
|
||||
}
|
||||
|
||||
getPong = async () => {
|
||||
try {
|
||||
const response = await this.pingService.getAll();
|
||||
return response.api;
|
||||
console.log(response);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user