useless api

This commit is contained in:
murdle 2026-01-06 23:34:30 +02:00
parent 296ceb3fd4
commit f5130a4e37
2 changed files with 16 additions and 0 deletions

14
src/api/accounts.ts Normal file
View File

@ -0,0 +1,14 @@
import { Hono } from "hono";
import { randomBytes } from "node:crypto"
const accounts = new Hono();
accounts.post(
"/registerDevice",
(c) => {
const key = randomBytes(16).toString("hex");
return c.text(`DeviceId=${key}\nDeviceKey=${key}`)
}
)
export default accounts

View File

@ -9,6 +9,7 @@ import video from "./api/video.js"
import playback from "./api/playback.js"
import channel from "./api/channel.js"
import feed from "./api/feed.js"
import accounts from "./api/accounts.js"
const app = new Hono()
@ -19,6 +20,7 @@ app.route("/getvideo", playback);
app.route("/feeds/api", video);
app.route("/feeds/api", channel);
app.route("/feeds/api", feed);
app.route("/youtube/accounts", accounts);
serve({
fetch: app.fetch,