add pushcode endpoint binding
@@ -240,13 +240,14 @@ export class APIService {
if (err.status === 401) {
let path = window.location.pathname;
if (NO_LOGIN_ROUTES.find((r) => path.startsWith(r))) return;
- if (!(path?.length > 0)) path = null;
+ if (path?.length > 1) {
console.log('api', path);
- this.router.navigate(['/login'], {
+ this.router.navigate(['/'], {
queryParams: {
redirect: path,
},
});
+ }
return of(null);
}
@@ -1100,4 +1101,8 @@ export class APIService {
.post(this.rcUserSettings('privacy'), settings, this.defopts())
.pipe(catchError(this.errorCatcher));
}
+
+ public postPushCode(code: string): Observable<any> {
+ return this.http.post(this.rcAuth('pushcode'), { code }, this.defopts());
+ }
}
