Implement premium features and GDPR compliance in bot and WebUI
- Added new models for premium tier configurations and assignments, enabling feature limits for free and premium users. - Introduced GDPR deletion logging and commands for user data management. - Enhanced logging configuration with retention days for audit logs. - Updated bot commands and job processing to include new premium and GDPR functionalities. - Improved localization with new keys for premium features and GDPR commands in both English and German. - Added UI components for managing premium settings and logging retention in the WebUI.
This commit is contained in:
@@ -2,7 +2,7 @@ import { SocialFeedDashboardCreateSchema } from '@nexumi/shared';
|
||||
import { type NextRequest, NextResponse } from 'next/server';
|
||||
import { requireGuildAccess, toApiErrorResponse } from '@/lib/auth';
|
||||
import { writeDashboardAudit } from '@/lib/audit';
|
||||
import { createFeed, listFeeds } from '@/lib/module-configs/feeds';
|
||||
import { createFeed, FeedPremiumError, listFeeds } from '@/lib/module-configs/feeds';
|
||||
import { prisma } from '@/lib/prisma';
|
||||
|
||||
interface RouteParams {
|
||||
@@ -39,6 +39,9 @@ export async function POST(request: NextRequest, { params }: RouteParams) {
|
||||
|
||||
return NextResponse.json(feed, { status: 201 });
|
||||
} catch (error) {
|
||||
if (error instanceof FeedPremiumError) {
|
||||
return NextResponse.json({ error: error.code }, { status: 403 });
|
||||
}
|
||||
return toApiErrorResponse(error);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user