Skip to content

Commit

Permalink
fix(poster): Add feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperVK committed Nov 29, 2024
1 parent 20a807a commit 6520928
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ import {Request as ExpressRequest} from "express";
import {TrainResponse} from "../ns-trains-service";
import GEWISPosterService, {GEWISPhotoAlbumParams} from "./gewis-poster-service";
import OlympicsService from "../olympics-service";
import {FeatureEnabled} from "../../../../server-settings";

interface GewisPosterResponse extends BasePosterResponse {
borrelMode: boolean;
}

@Route('handler/screen/gewis-poster')
@Tags('Handlers')
@FeatureEnabled('GewisPosterScreenHandler')
export class GewisPosterScreenController extends BasePosterScreenController {
protected screenHandler: GewisPosterScreenHandler;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import BasePosterScreenHandler from "../base-poster-screen-handler";
import { Namespace } from "socket.io";
import { FeatureEnabled } from "../../../../server-settings";


@FeatureEnabled('GewisPosterScreenHandler')
export default class GewisPosterScreenHandler extends BasePosterScreenHandler {
private borrelModeDay: number | undefined;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ import {Get, Post, Request, Route, Security, Tags} from "tsoa";
import {SecurityNames} from "../../../../../helpers/security";
import {securityGroups} from "../../../../../helpers/security-groups";
import {Request as ExpressRequest} from "express";
import {FeatureEnabled} from "../../../../server-settings";

@Route('handler/screen/hubble-poster')
@Tags('Handlers')
@FeatureEnabled('HubblePosterScreenHandler')
export class HubblePosterScreenController extends BasePosterScreenController {
constructor() {
super();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import BasePosterScreenHandler from "../base-poster-screen-handler";
import { Namespace } from "socket.io";
import {FeatureEnabled} from "../../../../server-settings";

@FeatureEnabled('HubblePosterScreenHandler')
export default class HubblePosterScreenHandler extends BasePosterScreenHandler {
constructor(socket: Namespace) {
super(socket);
Expand Down
4 changes: 4 additions & 0 deletions src/modules/handlers/screen/screen-handler-settings.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
export interface ScreenHandlerSettings {
RoomResponsibleLegacyScreenURL: string;
HubblePosterScreenHandler: boolean;
GewisPosterScreenHandler: boolean;
}

export const ScreenHandlerSettingsDefaults: ScreenHandlerSettings = {
RoomResponsibleLegacyScreenURL: '',
HubblePosterScreenHandler: false,
GewisPosterScreenHandler: false,
};

0 comments on commit 6520928

Please sign in to comment.