Added top bar on all pages. Simplified TTS login component. Fixed some issues. Removed redirects for now.
This commit is contained in:
@ -2,7 +2,7 @@ import { HttpClient } from '@angular/common/http';
|
||||
import { inject, Injectable } from '@angular/core';
|
||||
import { environment } from '../../../environments/environment';
|
||||
import TwitchRedemption from '../models/twitch-redemption';
|
||||
import { of } from 'rxjs';
|
||||
import { catchError, EMPTY, Observable, of } from 'rxjs';
|
||||
import EventService from './EventService';
|
||||
|
||||
@Injectable({
|
||||
@ -31,10 +31,12 @@ export default class TwitchRedemptionService {
|
||||
'Authorization': 'Bearer ' + localStorage.getItem('jwt'),
|
||||
}
|
||||
});
|
||||
$.subscribe(d => {
|
||||
this.twitchRedemptions = d;
|
||||
this.loaded = true;
|
||||
});
|
||||
$.pipe(catchError(() => EMPTY))
|
||||
.subscribe({
|
||||
next: d => this.twitchRedemptions = d,
|
||||
error: d => console.log('Twitch API redemptions:', d.error),
|
||||
complete: () => this.loaded = true,
|
||||
});
|
||||
return $;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user