YoutubeDownloaderREADME.md1 match
17โ โโโ index.ts # Main Hono server
18โ โโโ routes/
19โ โ โโโ download.ts # Download API endpoints
20โ โ โโโ static.ts # Static file serving
21โ โโโ services/
YoutubeDownloaderindex.ts3 matches
10});
1112// API routes
13app.route("/api/download", downloadRoutes);
1415// Static file serving and main routes
21status: "healthy",
22timestamp: new Date().toISOString(),
23service: "YouTube Downloader API"
24});
25});
YoutubeDownloaderdownload.ts4 matches
5const download = new Hono();
67// POST /api/download - Start a download
8download.post("/", async (c) => {
9try {
44});
4546// GET /api/download/video/:videoId - Download video file
47download.get("/video/:videoId", async (c) => {
48const videoId = c.req.param("videoId");
61});
6263// GET /api/download/audio/:videoId - Download audio file
64download.get("/audio/:videoId", async (c) => {
65const videoId = c.req.param("videoId");
78});
7980// GET /api/download/status/:videoId - Check download status
81download.get("/status/:videoId", async (c) => {
82const videoId = c.req.param("videoId");
28};
2930const response = await fetch("/api/download", {
31method: "POST",
32headers: {
9192// Register
93app.post("/api/auth/register", async c => {
94try {
95const { username, email, password, display_name } = await c.req.json();
151152// Login
153app.post("/api/auth/login", async c => {
154try {
155const { username, password } = await c.req.json();
194195// Logout
196app.post("/api/auth/logout", async c => {
197try {
198const sessionId = getSessionFromCookie(c.req.header('cookie'));
210211// Get current user
212app.get("/api/auth/me", async c => {
213try {
214const user = await getCurrentUser(c);
235236// Create artwork
237app.post("/api/artworks", async c => {
238try {
239const user = await getCurrentUser(c);
266267// Get user's artworks
268app.get("/api/artworks/my", async c => {
269try {
270const user = await getCurrentUser(c);
287288// Get public artworks
289app.get("/api/artworks/public", async c => {
290try {
291const limit = parseInt(c.req.query('limit') || '50');
301302// Get artwork by ID
303app.get("/api/artworks/:id", async c => {
304try {
305const id = parseInt(c.req.param('id'));
324325// Update artwork
326app.put("/api/artworks/:id", async c => {
327try {
328const user = await getCurrentUser(c);
347348// Delete artwork
349app.delete("/api/artworks/:id", async c => {
350try {
351const user = await getCurrentUser(c);
369370// Search artworks
371app.get("/api/artworks/search", async c => {
372try {
373const query = c.req.query('q');
1// Simple password hashing using Web Crypto API
2export async function hashPassword(password: string): Promise<string> {
3const encoder = new TextEncoder();
ai_comments_to_tasksindex.ts2 matches
245}
246247// API endpoint to analyze PR messages
248app.post("/api/analyze", async c => {
249try {
250const body: AnalysisRequest = await c.req.json();
309310try {
311const response = await fetch("/api/analyze", {
312method: "POST",
313headers: {
RJ-DownDetectortelegram.ts1 match
30// This is a no-op if nothing's changed
31if (!isEndpointSet) {
32await bot.api.setWebhook(req.url, {
33secret_token: SECRET_TOKEN,
34});
untitled-9921index.ts4 matches
23}
2425// API Routes
26app.route("/api/tools", toolsRouter);
2728// Manual database seeding endpoint (for testing)
29app.get("/api/seed", async c => {
30try {
31console.log('๐ง Starting manual seed...');
126127// Test endpoint to check table name
128app.get("/api/test-table", async c => {
129try {
130const { TABLE_NAME } = await import("./database/migrations.ts");