add projects and metrics routes

This commit is contained in:
ngn
2025-01-09 00:30:59 +03:00
parent dee3ef4d85
commit ac307de76c
32 changed files with 781 additions and 492 deletions

4
api/sql/admin_log.sql Normal file
View File

@ -0,0 +1,4 @@
CREATE TABLE IF NOT EXISTS admin_log(
action TEXT NOT NULL,
time INTEGER NOT NULL
);

4
api/sql/metrics.sql Normal file
View File

@ -0,0 +1,4 @@
CREATE TABLE IF NOT EXISTS metrics(
key TEXT NOT NULL UNIQUE,
value INTEGER NOT NULL
);

7
api/sql/news.sql Normal file
View File

@ -0,0 +1,7 @@
CREATE TABLE IF NOT EXISTS news(
id TEXT NOT NULL UNIQUE,
title TEXT NOT NULL,
author TEXT NOT NULL,
time INTEGER NOT NULL,
content TEXT NOT NULL
);

6
api/sql/projects.sql Normal file
View File

@ -0,0 +1,6 @@
CREATE TABLE IF NOT EXISTS projects(
name TEXT NOT NULL UNIQUE,
desc TEXT NOT NULL,
url TEXT NOT NULL,
license TEXT
);

10
api/sql/services.sql Normal file
View File

@ -0,0 +1,10 @@
CREATE TABLE IF NOT EXISTS services(
name TEXT NOT NULL UNIQUE,
desc TEXT NOT NULL,
check_time INTEGER NOT NULL,
check_res INTEGER NOT NULL,
check_url TEXT NOT NULL,
clear TEXT,
onion TEXT,
i2p TEXT
);