2024-07-06 01:01:52 +00:00
|
|
|
import { Routes } from '@angular/router';
|
2024-12-28 01:36:33 +00:00
|
|
|
import { PolicyComponent } from './policies/policy/policy.component';
|
2024-10-31 05:33:11 +00:00
|
|
|
import { AuthUserGuard } from './shared/auth/auth.user.guard';
|
2025-01-07 17:56:11 +00:00
|
|
|
import { LoginComponent } from './auth/login/login.component';
|
|
|
|
import { TtsLoginComponent } from './auth/tts-login/tts-login.component';
|
2024-10-17 08:48:15 +00:00
|
|
|
import { TwitchAuthCallbackComponent } from './twitch-auth-callback/twitch-auth-callback.component';
|
2024-12-28 01:37:44 +00:00
|
|
|
import { FiltersComponent } from './tts-filters/filters/filters.component';
|
2025-01-07 17:56:11 +00:00
|
|
|
import { AuthAdminGuard } from './shared/auth/auth.admin.guard';
|
|
|
|
import { AuthVisitorGuard } from './shared/auth/auth.visitor.guard';
|
2025-01-08 21:50:18 +00:00
|
|
|
import { ActionsComponent } from './actions/actions/actions.component';
|
2025-01-13 23:37:31 +00:00
|
|
|
import { RedemptionsComponent } from './redemptions/redemptions/redemptions.component';
|
|
|
|
import RedemptionResolver from './shared/resolvers/redemption-resolver';
|
|
|
|
import TwitchRedemptionResolver from './shared/resolvers/twitch-redemption-resolver';
|
|
|
|
import RedeemableActionResolver from './shared/resolvers/redeemable-action-resolver';
|
2025-01-15 19:45:56 +00:00
|
|
|
import TtsFilterResolver from './shared/resolvers/tts-filter-resolver';
|
2025-01-15 20:19:44 +00:00
|
|
|
import ApiKeyResolver from './shared/resolvers/api-key-resolver';
|
2024-07-06 01:01:52 +00:00
|
|
|
|
2024-10-17 08:48:15 +00:00
|
|
|
export const routes: Routes = [
|
2025-01-07 17:56:11 +00:00
|
|
|
{
|
|
|
|
path: 'policies',
|
|
|
|
component: PolicyComponent,
|
|
|
|
canActivate: [AuthUserGuard],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'filters',
|
|
|
|
component: FiltersComponent,
|
|
|
|
canActivate: [AuthUserGuard],
|
2025-01-15 19:45:56 +00:00
|
|
|
resolve: {
|
|
|
|
filters: TtsFilterResolver,
|
|
|
|
}
|
2025-01-07 17:56:11 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'actions',
|
2025-01-08 21:50:18 +00:00
|
|
|
component: ActionsComponent,
|
2025-01-14 03:50:30 +00:00
|
|
|
canActivate: [AuthUserGuard],
|
2025-01-13 23:37:31 +00:00
|
|
|
resolve: {
|
|
|
|
redeemableActions: RedeemableActionResolver,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'redemptions',
|
|
|
|
component: RedemptionsComponent,
|
2025-01-14 03:50:30 +00:00
|
|
|
canActivate: [AuthUserGuard],
|
2025-01-13 23:37:31 +00:00
|
|
|
resolve: {
|
|
|
|
redeemableActions: RedeemableActionResolver,
|
|
|
|
redemptions: RedemptionResolver,
|
|
|
|
twitchRedemptions: TwitchRedemptionResolver,
|
|
|
|
}
|
2025-01-07 17:56:11 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'login',
|
|
|
|
component: LoginComponent,
|
|
|
|
canActivate: [AuthVisitorGuard],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'tts-login',
|
|
|
|
component: TtsLoginComponent,
|
|
|
|
canActivate: [AuthUserGuard],
|
2025-01-15 20:19:44 +00:00
|
|
|
resolve: {
|
|
|
|
keys: ApiKeyResolver,
|
|
|
|
}
|
2025-01-07 17:56:11 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'auth',
|
|
|
|
component: TwitchAuthCallbackComponent,
|
|
|
|
canActivate: [AuthVisitorGuard],
|
|
|
|
}
|
2024-10-17 08:48:15 +00:00
|
|
|
];
|