网络直播增加开关
This commit is contained in:
@@ -27,6 +27,12 @@ export async function POST(request: NextRequest) {
|
||||
}
|
||||
|
||||
switch (action) {
|
||||
case 'toggleEnabled': {
|
||||
const { enabled } = body;
|
||||
config.WebLiveEnabled = enabled;
|
||||
break;
|
||||
}
|
||||
|
||||
case 'add': {
|
||||
const { name, platform, roomId } = body;
|
||||
if (!name || !platform || !roomId) {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { NextRequest, NextResponse } from 'next/server';
|
||||
import { getConfig } from '@/lib/config';
|
||||
|
||||
export const dynamic = 'force-dynamic'; // 禁用缓存
|
||||
|
||||
export async function GET(request: NextRequest) {
|
||||
try {
|
||||
const config = await getConfig();
|
||||
|
||||
Reference in New Issue
Block a user