mirror of
https://github.com/zimplexing/OrionTV.git
synced 2026-02-04 03:36:29 +08:00
- Added LoginModal component for user login functionality. - Introduced API routes for user login, favorites, play records, and search history management. - Created JSON files for storing favorites, play records, and search history. - Updated API service to handle new endpoints and refactored data management to use API calls instead of local storage. - Adjusted data structures in types and services to align with new API responses.
28 lines
694 B
TypeScript
28 lines
694 B
TypeScript
import express, { Request, Response } from "express";
|
|
|
|
const router = express.Router();
|
|
|
|
/**
|
|
* @api {get} /api/server-config Get Server Configuration
|
|
* @apiName GetServerConfig
|
|
* @apiGroup Server
|
|
*
|
|
* @apiSuccess {String} SiteName The name of the site.
|
|
* @apiSuccess {String} StorageType The storage type used by the server ("localstorage").
|
|
*
|
|
* @apiSuccessExample {json} Success-Response:
|
|
* HTTP/1.1 200 OK
|
|
* {
|
|
* "SiteName": "OrionTV-Local",
|
|
* "StorageType": "localstorage"
|
|
* }
|
|
*/
|
|
router.get("/server-config", (req: Request, res: Response) => {
|
|
res.json({
|
|
SiteName: "OrionTV-Local",
|
|
StorageType: "localstorage",
|
|
});
|
|
});
|
|
|
|
export default router;
|