license and some functions

This commit is contained in:
Mateusz Gruszczyński
2026-07-29 14:03:46 +02:00
parent 0655cfe48c
commit ef8dfc67c1
56 changed files with 2586 additions and 547 deletions
+18 -4
View File
@@ -1,6 +1,14 @@
/*
* Copyright (C) 2026 Mateusz Gruszczyński @linuxiarz.pl
* Source-Available Code / Dual-Licensed.
*
* Free for non-commercial and evaluation use under terms of BSL/GPLv3.
* Commercial or production use requires a valid paid license.
* See LICENSE file in repository root for details.
*/
mod pages;
use pages::*;
use axum::{
Router,
extract::{DefaultBodyLimit, Request},
@@ -9,6 +17,7 @@ use axum::{
response::Response,
routing::{get, post},
};
use pages::*;
use tower::{ServiceBuilder, service_fn};
use tower_http::{services::ServeDir, set_header::SetResponseHeaderLayer, trace::TraceLayer};
@@ -118,7 +127,10 @@ pub fn router(
"/api/pads/{slug}/editor-color",
get(api::pad_editor_color).post(api::set_pad_editor_color),
)
.route("/api/pads/{slug}/editor-settings", post(api::set_pad_editor_settings))
.route(
"/api/pads/{slug}/editor-settings",
post(api::set_pad_editor_settings),
)
.route("/api/pads/{slug}/publish", post(api::publish_pad_page))
.route("/api/pads/{slug}/restore", post(api::pad_restore))
.route(
@@ -147,7 +159,10 @@ pub fn router(
"/api/workspaces/{workspace_slug}/notes/{note_slug}/editor-color",
get(api::note_editor_color).post(api::set_note_editor_color),
)
.route("/api/workspaces/{workspace_slug}/notes/{note_slug}/editor-settings", post(api::set_note_editor_settings))
.route(
"/api/workspaces/{workspace_slug}/notes/{note_slug}/editor-settings",
post(api::set_note_editor_settings),
)
.route(
"/api/workspaces/{workspace_slug}/notes/{note_slug}/publish",
post(api::publish_note_page),
@@ -233,4 +248,3 @@ async fn add_non_asset_security_headers(request: Request, next: Next) -> Respons
response
}