mirror of
https://github.com/yusufipk/RepoHub.git
synced 2026-09-11 18:46:07 +00:00
chore: remove debug endpoints and update configuration
- Removed debug-packages and test-sync API endpoints no longer needed - Extracted sync status management into shared lib/sync/status module - Updated Next.js config to remove deprecated experimental appDir flag - Added port specification to production start script for consistency
This commit is contained in:
@@ -32,7 +32,7 @@ CREATE TABLE packages (
|
||||
id VARCHAR(100) PRIMARY KEY,
|
||||
name VARCHAR(255) NOT NULL,
|
||||
description TEXT,
|
||||
version VARCHAR(50),
|
||||
version VARCHAR(255),
|
||||
platform_id VARCHAR(50) NOT NULL REFERENCES platforms(id),
|
||||
category_id INTEGER REFERENCES categories(id),
|
||||
license_id INTEGER REFERENCES licenses(id),
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
// Global sync state (in production, use Redis or database)
|
||||
let syncInProgress = false
|
||||
let syncProgress = { message: '', progress: 0, total: 100 }
|
||||
|
||||
// Export functions for other endpoints to use
|
||||
export function setSyncProgress(message: string, progress?: number, total?: number) {
|
||||
syncProgress = { message, progress: progress || 0, total: total || 100 }
|
||||
}
|
||||
|
||||
export function setSyncInProgress(inProgress: boolean) {
|
||||
syncInProgress = inProgress
|
||||
}
|
||||
|
||||
export function getSyncStatus() {
|
||||
return {
|
||||
inProgress: syncInProgress,
|
||||
progress: syncProgress
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user