mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-26 07:28:45 -07:00
628f430645
* feat: add 3D Charades word lists management and profanity filter toggle - Implemented Charades word lists management in the admin UI, allowing for unlimited named word lists with difficulty settings. - Added functionality to bind live card slots to specific word lists, with automatic fallback to built-in lists. - Introduced a profanity filter toggle in server settings, enabling or disabling the server-side profanity filter. - Updated database schema to support new features, including additional columns for profanity filter status and charades slot bindings. - Enhanced documentation to reflect new features and their usage. * feat: add identityserver-signing.pfx to .gitignore * feat: add new matchmake routes for player, event, club, and code
33 lines
1.5 KiB
C#
33 lines
1.5 KiB
C#
using Microsoft.AspNetCore.Mvc;
|
|
using DorkNet.Server.Services;
|
|
|
|
namespace DorkNet.Server.Controllers.API.Activities;
|
|
|
|
/// <summary>
|
|
/// api.{rec.net,localhost}/api/activities/* — per-activity content
|
|
/// (charades words, party-game prompts, etc.).
|
|
///
|
|
/// The March 2023 watch fetches a 3D Charades deck at card-box spawn from
|
|
/// <c>api/activities/charades/v1/words/{source}</c>, where <c>{source}</c>
|
|
/// is one of three baked <c>CardBox.cardSource</c> slots — <c>Charades</c>,
|
|
/// <c>CharadesAprilFoolsDay</c>, or <c>Icebreakers</c> (verified in the
|
|
/// 2023.03.21 il2cpp dump). We resolve the admin-bound word list for the
|
|
/// requested slot via <see cref="CharadesWordListService"/> and return the
|
|
/// wire array of <c>{ EN_US, Difficulty }</c>. The older December route
|
|
/// (no <c>{source}</c>) maps to the default Charades slot.
|
|
/// </summary>
|
|
[ApiController]
|
|
public class ActivitiesController(CharadesWordListService charades) : ControllerBase
|
|
{
|
|
[HttpGet("api/activities/charades/v1/words/{source}")]
|
|
public async Task<IActionResult> CharadesWords(string source)
|
|
=> Ok(await charades.ResolveWireWordsAsync(source));
|
|
|
|
/// <summary>December 2020 shape — no source segment. Serves the default
|
|
/// Charades slot so the older client still gets a populated deck.</summary>
|
|
[HttpGet("api/activities/charades/v1/words")]
|
|
public async Task<IActionResult> CharadesWordsDefault()
|
|
=> Ok(await charades.ResolveWireWordsAsync(
|
|
nameof(CharadesWordListService.CharadesSlot.Charades)));
|
|
}
|