mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-04 14:29:45 +00:00
health page, manifest page, watch unauth, begin redesign
This commit is contained in:
committed by
Aiden McClelland
parent
7013364ae8
commit
5d24d9324c
@@ -22,7 +22,7 @@ export class HttpService {
|
||||
this.fullUrl = `${window.location.protocol}//${window.location.hostname}:${port}/${url}/${version}`
|
||||
}
|
||||
|
||||
watch401$ (): Observable<{ }> {
|
||||
watchUnauth$ (): Observable<{ }> {
|
||||
return this.unauthorizedApiResponse$.asObservable()
|
||||
}
|
||||
|
||||
@@ -36,7 +36,10 @@ export class HttpService {
|
||||
|
||||
const res = await this.httpRequest<RPCResponse<T>>(httpOpts)
|
||||
|
||||
if (isRpcError(res)) throw new RpcError(res.error)
|
||||
if (isRpcError(res)) {
|
||||
if (res.error.code === 34) this.unauthorizedApiResponse$.next(true)
|
||||
throw new RpcError(res.error)
|
||||
}
|
||||
|
||||
if (isRpcSuccess(res)) return res.result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user