creat_room -> create_room
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
/**
|
||||
* Redis Data Structures Used by setTrackHandler:
|
||||
*
|
||||
*
|
||||
* 1. Daily Referrer Counts:
|
||||
* - Key Pattern: `referrers:daily:<YYYY-MM-DD>` (e.g., "referrers:daily:2024-03-15")
|
||||
* - Type: Hash
|
||||
* - Fields: Referrer source string (e.g., "producthunt", "twitter").
|
||||
* - Values: Count of referrals from that source for that day.
|
||||
* - TTL: Set to 30 days upon creation or update.
|
||||
* - Operations:
|
||||
* - Operations:
|
||||
* - `HINCRBY`: Increments the count for a specific referrer for the given day.
|
||||
* - `EXPIRE`: Sets/refreshes the 30-day TTL for the daily statistics key.
|
||||
* - These operations are performed within a `MULTI` transaction.
|
||||
*
|
||||
*
|
||||
*/
|
||||
import { Router, RequestHandler } from "express";
|
||||
import { redis } from "../services/redis";
|
||||
@@ -137,7 +137,7 @@ const logsDebugHandler: RequestHandler<{}, any, LogMessage> = async (
|
||||
};
|
||||
|
||||
// 注册路由
|
||||
router.post("/api/creat_room", createRoomHandler);
|
||||
router.post("/api/create_room", createRoomHandler);
|
||||
router.get("/api/get_room", getRoomHandler);
|
||||
router.post("/api/check_room", checkRoomHandler);
|
||||
router.post("/api/set_track", setTrackHandler);
|
||||
|
||||
@@ -5,7 +5,7 @@ const API_URL = process.env.NEXT_PUBLIC_API_URL || "";
|
||||
export const API_ROUTES = {
|
||||
get_room: `${API_URL}/api/get_room`,
|
||||
check_room: `${API_URL}/api/check_room`,
|
||||
creat_room: `${API_URL}/api/creat_room`,
|
||||
create_room: `${API_URL}/api/create_room`,
|
||||
set_track: `${API_URL}/api/set_track`,
|
||||
logs_debug: `${API_URL}/api/logs_debug`,
|
||||
};
|
||||
@@ -56,7 +56,7 @@ export const createRoom = async (roomId: string): Promise<boolean> => {
|
||||
body: JSON.stringify({ roomId }),
|
||||
});
|
||||
const data = await apiCall<{ success: boolean }>(
|
||||
API_ROUTES.creat_room,
|
||||
API_ROUTES.create_room,
|
||||
options
|
||||
);
|
||||
return data?.success ?? false;
|
||||
|
||||
Reference in New Issue
Block a user