fleencorp / fleen-feen

Fleen Feen connects you with the world
GNU General Public License v3.0
0 stars 1 forks source link

Comprehensive Refactor and Enhancements for Live Broadcast and Event Services #39

Closed aalamu closed 1 week ago

aalamu commented 1 week ago

Overview

This pull request introduces significant refactoring, enhancements, and bug fixes to improve code organization, internationalization support, database schema, and controller methods within the application.

Changes Included

  1. Renaming and Fixes:

    • Renamed Unblock to Unblocked in BlockStatus.
    • Fixed the incorrect table name in BlockUser.
  2. Refactoring:

    • Added final modifiers to method variables and parameters to ensure immutability.
    • Refactored CreateLiveBroadcastRequest to extend LiveBroadcastRequest for improved code reuse.
    • Moved classes such as DataForCreateStreamResponse to the broadcast package for better organization.
    • Refactored EventController and LiveBroadcastController, relocating @PreAuthorize annotations from the class level to individual route handlers.
    • Updated and moved common/shared methods to StreamService.
    • Refactored EventService, LiveBroadcastService, and LiveBroadcastServiceImpl to improve method handling and structure.
    • Renamed EventAttendeeResponse.java and EventAttendeesResponse.java to EventOrStreamAttendeeResponse and EventOrStreamAttendeesResponse.java.
  3. Database Schema Updates:

    • Refactored the Liquibase create-schema SQL file:
      • Fixed bugs and typos.
      • Added timestamp columns (created_on & updated_on).
      • Adjusted column options such as title and description in the stream_speaker table.
  4. Controller Enhancements:

    • Added new route handler methods in UserLiveBroadcastController.
    • Updated RescheduleLiveBroadcastRequest, UpdateLiveBroadcastRequest, and UpdateLiveBroadcastVisibilityRequest to include accessToken.
  5. Localization:

    • Added localized responses and updated message sources to enhance internationalization (i18n) support.
  6. Other Updates:

    • Added getVisibility() method to LiveBroadcastRequest.
    • Changed the modifier for the accessToken variable from private to protected.
    • Updated StreamAttendeeMapper.
    • Refactored LiveBroadcastServiceImpl to list assignable categories using YouTubeChannelService.listAssignableCategories().
    • Added new classes such as TotalStreamsAttendedByUserResponse and TotalStreamsCreatedByUserResponse.

Purpose

This refactoring and enhancement aim to:

Notes

Testing