From 802bf713258c9005d4bb29d8ce991342aa93cf50 Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Wed, 1 Nov 2023 17:12:16 +0530 Subject: [PATCH 1/3] feat: reuse --- migrations/20211001071311_survey_users.sql | 4 ++++ migrations/20211011041634_survey_admins.sql | 4 ++++ .../20230131114916_survey_bench_date.sql | 4 ++++ .../20230201101934_survey_bench_type.sql | 4 ++++ .../20230701082846_survey_mcaptcha_upload.sql | 4 ++++ src/api/mod.rs | 20 ++++-------------- src/api/v1/admin/account/delete.rs | 20 ++++-------------- src/api/v1/admin/account/email.rs | 21 +++++-------------- src/api/v1/admin/account/mod.rs | 20 ++++-------------- src/api/v1/admin/account/password.rs | 21 +++++-------------- src/api/v1/admin/account/secret.rs | 21 +++++-------------- src/api/v1/admin/account/test.rs | 20 ++++-------------- src/api/v1/admin/account/username.rs | 21 +++++-------------- src/api/v1/admin/auth.rs | 20 ++++-------------- src/api/v1/admin/campaigns.rs | 21 +++++-------------- src/api/v1/admin/mod.rs | 21 +++++-------------- src/api/v1/admin/tests/auth.rs | 20 ++++-------------- src/api/v1/admin/tests/mod.rs | 21 +++++-------------- src/api/v1/admin/tests/protected.rs | 20 ++++-------------- src/api/v1/bench.rs | 21 +++++-------------- src/api/v1/mcaptcha/db.rs | 21 +++++-------------- src/api/v1/mcaptcha/hooks.rs | 21 +++++-------------- src/api/v1/mcaptcha/mod.rs | 21 +++++-------------- src/api/v1/meta.rs | 20 ++++-------------- src/api/v1/mod.rs | 21 +++++-------------- src/api/v1/routes.rs | 21 +++++-------------- src/archive.rs | 21 +++++-------------- src/cache_buster_data.json.license | 3 +++ src/data.rs | 21 +++++-------------- src/db.rs | 4 ++++ src/errors.rs | 21 +++++-------------- src/main.rs | 21 +++++-------------- src/mcaptcha.rs | 21 +++++-------------- src/pages/auth/join.rs | 21 +++++-------------- src/pages/auth/login.rs | 21 +++++-------------- src/pages/auth/mod.rs | 21 +++++-------------- src/pages/auth/sudo.rs | 21 +++++-------------- src/pages/errors.rs | 21 +++++-------------- src/pages/mod.rs | 21 +++++-------------- src/pages/panel/campaigns/about.rs | 21 +++++-------------- src/pages/panel/campaigns/bench.rs | 21 +++++-------------- src/pages/panel/campaigns/delete.rs | 21 +++++-------------- src/pages/panel/campaigns/mod.rs | 20 +++++------------- src/pages/panel/campaigns/new.rs | 21 +++++-------------- src/pages/panel/campaigns/results.rs | 21 +++++-------------- src/pages/panel/export.rs | 20 +++++------------- src/pages/panel/mod.rs | 20 +++++------------- src/pages/routes.rs | 21 +++++-------------- src/settings.rs | 21 +++++-------------- src/static_assets/filemap.rs | 21 +++++-------------- src/static_assets/mod.rs | 21 +++++-------------- src/static_assets/static_files.rs | 21 +++++-------------- src/tests-migrate.rs | 21 +++++-------------- src/tests.rs | 21 +++++-------------- 54 files changed, 254 insertions(+), 749 deletions(-) create mode 100644 src/cache_buster_data.json.license diff --git a/migrations/20211001071311_survey_users.sql b/migrations/20211001071311_survey_users.sql index 027bab1..ce21a39 100644 --- a/migrations/20211001071311_survey_users.sql +++ b/migrations/20211001071311_survey_users.sql @@ -1,3 +1,7 @@ +-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan +-- +-- SPDX-License-Identifier: AGPL-3.0-or-later + CREATE TABLE IF NOT EXISTS survey_users ( ID UUID PRIMARY KEY NOT NULL UNIQUE, created_at TIMESTAMPTZ NOT NULL diff --git a/migrations/20211011041634_survey_admins.sql b/migrations/20211011041634_survey_admins.sql index daae09d..1a719d2 100644 --- a/migrations/20211011041634_survey_admins.sql +++ b/migrations/20211011041634_survey_admins.sql @@ -1,3 +1,7 @@ +-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan +-- +-- SPDX-License-Identifier: AGPL-3.0-or-later + -- Add migration script here CREATE TABLE IF NOT EXISTS survey_admins ( name VARCHAR(100) NOT NULL UNIQUE, diff --git a/migrations/20230131114916_survey_bench_date.sql b/migrations/20230131114916_survey_bench_date.sql index f2e96b4..b152e57 100644 --- a/migrations/20230131114916_survey_bench_date.sql +++ b/migrations/20230131114916_survey_bench_date.sql @@ -1,2 +1,6 @@ +-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan +-- +-- SPDX-License-Identifier: AGPL-3.0-or-later + ALTER TABLE survey_responses ADD COLUMN submitted_at TIMESTAMPTZ NOT NULL DEFAULT now(); diff --git a/migrations/20230201101934_survey_bench_type.sql b/migrations/20230201101934_survey_bench_type.sql index 1db5532..019c555 100644 --- a/migrations/20230201101934_survey_bench_type.sql +++ b/migrations/20230201101934_survey_bench_type.sql @@ -1,3 +1,7 @@ +-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan +-- +-- SPDX-License-Identifier: AGPL-3.0-or-later + CREATE TABLE IF NOT EXISTS survey_bench_type ( name VARCHAR(30) UNIQUE NOT NULL, ID SERIAL PRIMARY KEY NOT NULL diff --git a/migrations/20230701082846_survey_mcaptcha_upload.sql b/migrations/20230701082846_survey_mcaptcha_upload.sql index 65eb41f..9c0339b 100644 --- a/migrations/20230701082846_survey_mcaptcha_upload.sql +++ b/migrations/20230701082846_survey_mcaptcha_upload.sql @@ -1,3 +1,7 @@ +-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan +-- +-- SPDX-License-Identifier: AGPL-3.0-or-later + CREATE TABLE IF NOT EXISTS survey_mcaptcha_hostname ( url VARCHAR(3000) UNIQUE NOT NULL, secret VARCHAR(100) UNIQUE NOT NULL, diff --git a/src/api/mod.rs b/src/api/mod.rs index cce780a..c72bf94 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -1,18 +1,6 @@ -/* - * Copyright (C) 2021 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later pub mod v1; diff --git a/src/api/v1/admin/account/delete.rs b/src/api/v1/admin/account/delete.rs index a92086f..1d97839 100644 --- a/src/api/v1/admin/account/delete.rs +++ b/src/api/v1/admin/account/delete.rs @@ -1,19 +1,7 @@ -/* -* Copyright (C) 2021 Aravinth Manivannan -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Affero General Public License as -* published by the Free Software Foundation, either version 3 of the -* License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU Affero General Public License for more details. -* -* You should have received a copy of the GNU Affero General Public License -* along with this program. If not, see . -*/ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later use actix_identity::Identity; use actix_web::{web, HttpResponse, Responder}; diff --git a/src/api/v1/admin/account/email.rs b/src/api/v1/admin/account/email.rs index 9c3a43a..f6f6cdf 100644 --- a/src/api/v1/admin/account/email.rs +++ b/src/api/v1/admin/account/email.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2021 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use std::borrow::Cow; use actix_identity::Identity; diff --git a/src/api/v1/admin/account/mod.rs b/src/api/v1/admin/account/mod.rs index bcbbf11..81d9c1a 100644 --- a/src/api/v1/admin/account/mod.rs +++ b/src/api/v1/admin/account/mod.rs @@ -1,19 +1,7 @@ -/* - * Copyright (C) 2021 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later use serde::{Deserialize, Serialize}; diff --git a/src/api/v1/admin/account/password.rs b/src/api/v1/admin/account/password.rs index 8873524..dc8f062 100644 --- a/src/api/v1/admin/account/password.rs +++ b/src/api/v1/admin/account/password.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2021 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use actix_identity::Identity; use actix_web::{web, HttpResponse, Responder}; use argon2_creds::Config; diff --git a/src/api/v1/admin/account/secret.rs b/src/api/v1/admin/account/secret.rs index b49395b..10820f1 100644 --- a/src/api/v1/admin/account/secret.rs +++ b/src/api/v1/admin/account/secret.rs @@ -1,19 +1,8 @@ -/* -* Copyright (C) 2021 Aravinth Manivannan -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Affero General Public License as -* published by the Free Software Foundation, either version 3 of the -* License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU Affero General Public License for more details. -* -* You should have received a copy of the GNU Affero General Public License -* along with this program. If not, see . -*/ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use std::borrow::Cow; use actix_identity::Identity; diff --git a/src/api/v1/admin/account/test.rs b/src/api/v1/admin/account/test.rs index ee18540..22e8c36 100644 --- a/src/api/v1/admin/account/test.rs +++ b/src/api/v1/admin/account/test.rs @@ -1,19 +1,7 @@ -/* -* Copyright (C) 2021 Aravinth Manivannan -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Affero General Public License as -* published by the Free Software Foundation, either version 3 of the -* License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU Affero General Public License for more details. -* -* You should have received a copy of the GNU Affero General Public License -* along with this program. If not, see . -*/ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later use actix_web::http::StatusCode; use actix_web::test; diff --git a/src/api/v1/admin/account/username.rs b/src/api/v1/admin/account/username.rs index 1bb79ab..2cb29df 100644 --- a/src/api/v1/admin/account/username.rs +++ b/src/api/v1/admin/account/username.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2021 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use std::borrow::Cow; use actix_identity::Identity; diff --git a/src/api/v1/admin/auth.rs b/src/api/v1/admin/auth.rs index 2bfb8b0..aac4894 100644 --- a/src/api/v1/admin/auth.rs +++ b/src/api/v1/admin/auth.rs @@ -1,19 +1,7 @@ -/* - * Copyright (C) 2021 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later use actix_identity::Identity; use actix_web::http::header; diff --git a/src/api/v1/admin/campaigns.rs b/src/api/v1/admin/campaigns.rs index 810d6da..a2448f2 100644 --- a/src/api/v1/admin/campaigns.rs +++ b/src/api/v1/admin/campaigns.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2021 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use std::borrow::Cow; use actix_identity::Identity; diff --git a/src/api/v1/admin/mod.rs b/src/api/v1/admin/mod.rs index 3da7527..fb1df11 100644 --- a/src/api/v1/admin/mod.rs +++ b/src/api/v1/admin/mod.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2021 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use actix_auth_middleware::*; use actix_web::web::ServiceConfig; diff --git a/src/api/v1/admin/tests/auth.rs b/src/api/v1/admin/tests/auth.rs index f459229..dc46ff0 100644 --- a/src/api/v1/admin/tests/auth.rs +++ b/src/api/v1/admin/tests/auth.rs @@ -1,19 +1,7 @@ -/* - * Copyright (C) 2021 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later use actix_web::http::{header, StatusCode}; use actix_web::test; diff --git a/src/api/v1/admin/tests/mod.rs b/src/api/v1/admin/tests/mod.rs index 09f3aa9..e408ef5 100644 --- a/src/api/v1/admin/tests/mod.rs +++ b/src/api/v1/admin/tests/mod.rs @@ -1,18 +1,7 @@ -/* -* Copyright (C) 2021 Aravinth Manivannan -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Affero General Public License as -* published by the Free Software Foundation, either version 3 of the -* License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU Affero General Public License for more details. -* -* You should have received a copy of the GNU Affero General Public License -* along with this program. If not, see . -*/ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + mod auth; mod protected; diff --git a/src/api/v1/admin/tests/protected.rs b/src/api/v1/admin/tests/protected.rs index 1edeb88..3998fa3 100644 --- a/src/api/v1/admin/tests/protected.rs +++ b/src/api/v1/admin/tests/protected.rs @@ -1,19 +1,7 @@ -/* -* Copyright (C) 2021 Aravinth Manivannan -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Affero General Public License as -* published by the Free Software Foundation, either version 3 of the -* License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU Affero General Public License for more details. -* -* You should have received a copy of the GNU Affero General Public License -* along with this program. If not, see . -*/ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later use actix_web::http::StatusCode; use actix_web::test; diff --git a/src/api/v1/bench.rs b/src/api/v1/bench.rs index d258dac..5bcbe69 100644 --- a/src/api/v1/bench.rs +++ b/src/api/v1/bench.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2021 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use std::borrow::Cow; use std::str::FromStr; diff --git a/src/api/v1/mcaptcha/db.rs b/src/api/v1/mcaptcha/db.rs index 8b2eef9..ca8c645 100644 --- a/src/api/v1/mcaptcha/db.rs +++ b/src/api/v1/mcaptcha/db.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2023 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2023 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use url::Url; use uuid::Uuid; diff --git a/src/api/v1/mcaptcha/hooks.rs b/src/api/v1/mcaptcha/hooks.rs index 42a3aa4..d0b9e2d 100644 --- a/src/api/v1/mcaptcha/hooks.rs +++ b/src/api/v1/mcaptcha/hooks.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2023 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2023 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use actix_web::web::ServiceConfig; use actix_web::{web, HttpResponse, Responder}; use serde::{Deserialize, Serialize}; diff --git a/src/api/v1/mcaptcha/mod.rs b/src/api/v1/mcaptcha/mod.rs index 87e79ee..90512c2 100644 --- a/src/api/v1/mcaptcha/mod.rs +++ b/src/api/v1/mcaptcha/mod.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2023 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2023 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use actix_web::web::ServiceConfig; pub mod db; diff --git a/src/api/v1/meta.rs b/src/api/v1/meta.rs index d34101e..2b62b16 100644 --- a/src/api/v1/meta.rs +++ b/src/api/v1/meta.rs @@ -1,19 +1,7 @@ -/* -* Copyright (C) 2021 Aravinth Manivannan -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Affero General Public License as -* published by the Free Software Foundation, either version 3 of the -* License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU Affero General Public License for more details. -* -* You should have received a copy of the GNU Affero General Public License -* along with this program. If not, see . -*/ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later use actix_web::{web, HttpResponse, Responder}; use derive_builder::Builder; diff --git a/src/api/v1/mod.rs b/src/api/v1/mod.rs index 39554fb..d32d80b 100644 --- a/src/api/v1/mod.rs +++ b/src/api/v1/mod.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2021 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use actix_web::web::ServiceConfig; use serde::Deserialize; use sqlx::types::Uuid; diff --git a/src/api/v1/routes.rs b/src/api/v1/routes.rs index eaf7425..faefd01 100644 --- a/src/api/v1/routes.rs +++ b/src/api/v1/routes.rs @@ -1,19 +1,8 @@ -/* -* Copyright (C) 2021 Aravinth Manivannan -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Affero General Public License as -* published by the Free Software Foundation, either version 3 of the -* License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU Affero General Public License for more details. -* -* You should have received a copy of the GNU Affero General Public License -* along with this program. If not, see . -*/ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use serde::Serialize; use super::admin::routes::Admin; diff --git a/src/archive.rs b/src/archive.rs index 6dc8c46..17c0fb7 100644 --- a/src/archive.rs +++ b/src/archive.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2023 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2023 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use std::path::{Path, PathBuf}; use serde::{Deserialize, Serialize}; diff --git a/src/cache_buster_data.json.license b/src/cache_buster_data.json.license new file mode 100644 index 0000000..08e8cf3 --- /dev/null +++ b/src/cache_buster_data.json.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2023 Aravinth Manivannan + +SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/src/data.rs b/src/data.rs index 0444525..4cc272d 100644 --- a/src/data.rs +++ b/src/data.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2021 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + //! App data: database connections, etc. use std::sync::Arc; use std::thread; diff --git a/src/db.rs b/src/db.rs index ab90125..a90ecd8 100644 --- a/src/db.rs +++ b/src/db.rs @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use lazy_static::lazy_static; use serde::{Deserialize, Serialize}; use sqlx::PgPool; diff --git a/src/errors.rs b/src/errors.rs index 620fce4..cf80992 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -1,19 +1,8 @@ -/* -* Copyright (C) 2021 Aravinth Manivannan -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Affero General Public License as -* published by the Free Software Foundation, either version 3 of the -* License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU Affero General Public License for more details. -* -* You should have received a copy of the GNU Affero General Public License -* along with this program. If not, see . -*/ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use std::convert::From; use argon2_creds::errors::CredsError; diff --git a/src/main.rs b/src/main.rs index 09575ed..ace7da7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2021 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use std::env; use std::sync::Arc; diff --git a/src/mcaptcha.rs b/src/mcaptcha.rs index f7c69c5..30a1f4c 100644 --- a/src/mcaptcha.rs +++ b/src/mcaptcha.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2023 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2023 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use std::time::Duration; use async_trait::async_trait; diff --git a/src/pages/auth/join.rs b/src/pages/auth/join.rs index ff58c8e..55cf7ce 100644 --- a/src/pages/auth/join.rs +++ b/src/pages/auth/join.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2022 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2022 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use actix_web::http::header::ContentType; use std::cell::RefCell; use tera::Context; diff --git a/src/pages/auth/login.rs b/src/pages/auth/login.rs index d03a015..0c5bf7d 100644 --- a/src/pages/auth/login.rs +++ b/src/pages/auth/login.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2022 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2022 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use std::cell::RefCell; use actix_identity::Identity; diff --git a/src/pages/auth/mod.rs b/src/pages/auth/mod.rs index 1a4b53b..d1fa790 100644 --- a/src/pages/auth/mod.rs +++ b/src/pages/auth/mod.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2023 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2023 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use actix_web::*; pub use super::{context, Footer, TemplateFile, PAGES, PAYLOAD_KEY, TEMPLATES}; diff --git a/src/pages/auth/sudo.rs b/src/pages/auth/sudo.rs index 73b6d64..88b94e4 100644 --- a/src/pages/auth/sudo.rs +++ b/src/pages/auth/sudo.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2021 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use sailfish::TemplateOnce; use crate::pages::errors::ErrorPage; diff --git a/src/pages/errors.rs b/src/pages/errors.rs index 7397975..7096d68 100644 --- a/src/pages/errors.rs +++ b/src/pages/errors.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2022 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2022 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use std::fmt; use actix_web::{ diff --git a/src/pages/mod.rs b/src/pages/mod.rs index 7e62993..222d236 100644 --- a/src/pages/mod.rs +++ b/src/pages/mod.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2022 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2022 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use actix_auth_middleware::*; use actix_web::web::ServiceConfig; use lazy_static::lazy_static; diff --git a/src/pages/panel/campaigns/about.rs b/src/pages/panel/campaigns/about.rs index 937ae6c..70a91ae 100644 --- a/src/pages/panel/campaigns/about.rs +++ b/src/pages/panel/campaigns/about.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2021 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use std::cell::RefCell; use std::str::FromStr; diff --git a/src/pages/panel/campaigns/bench.rs b/src/pages/panel/campaigns/bench.rs index bc77a2f..c51ae57 100644 --- a/src/pages/panel/campaigns/bench.rs +++ b/src/pages/panel/campaigns/bench.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2021 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use std::cell::RefCell; use actix_web::http::header::ContentType; diff --git a/src/pages/panel/campaigns/delete.rs b/src/pages/panel/campaigns/delete.rs index 4c0f7ec..7593e85 100644 --- a/src/pages/panel/campaigns/delete.rs +++ b/src/pages/panel/campaigns/delete.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2021 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use actix_identity::Identity; use serde::{Deserialize, Serialize}; use sqlx::types::Uuid; diff --git a/src/pages/panel/campaigns/mod.rs b/src/pages/panel/campaigns/mod.rs index 0410600..26dd25c 100644 --- a/src/pages/panel/campaigns/mod.rs +++ b/src/pages/panel/campaigns/mod.rs @@ -1,18 +1,8 @@ -/* - * Copyright (C) 2021 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License along with this program. If not, see . - */ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use std::cell::RefCell; use actix_identity::Identity; diff --git a/src/pages/panel/campaigns/new.rs b/src/pages/panel/campaigns/new.rs index b225164..76698f6 100644 --- a/src/pages/panel/campaigns/new.rs +++ b/src/pages/panel/campaigns/new.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2021 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use std::cell::RefCell; use actix_identity::Identity; diff --git a/src/pages/panel/campaigns/results.rs b/src/pages/panel/campaigns/results.rs index fd09d1b..1adc134 100644 --- a/src/pages/panel/campaigns/results.rs +++ b/src/pages/panel/campaigns/results.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2021 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use std::cell::RefCell; use std::str::FromStr; diff --git a/src/pages/panel/export.rs b/src/pages/panel/export.rs index b44f3f6..530afc2 100644 --- a/src/pages/panel/export.rs +++ b/src/pages/panel/export.rs @@ -1,18 +1,8 @@ -/* - * Copyright (C) 2023 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License along with this program. If not, see . - */ +// Copyright (C) 2023 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use std::cell::RefCell; use actix_web::http::header::ContentType; diff --git a/src/pages/panel/mod.rs b/src/pages/panel/mod.rs index 13d5700..279c327 100644 --- a/src/pages/panel/mod.rs +++ b/src/pages/panel/mod.rs @@ -1,18 +1,8 @@ -/* - * Copyright (C) 2021 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License along with this program. If not, see . - */ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use actix_web::{http, HttpResponse, Responder}; pub use super::{context, Footer, TemplateFile, PAGES, PAYLOAD_KEY, TEMPLATES}; diff --git a/src/pages/routes.rs b/src/pages/routes.rs index 56e14f3..1261eb8 100644 --- a/src/pages/routes.rs +++ b/src/pages/routes.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2021 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use actix_auth_middleware::GetLoginRoute; use serde::{Deserialize, Serialize}; diff --git a/src/settings.rs b/src/settings.rs index 7c7117e..0f84e1b 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2021 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use std::env; use std::fs; use std::path::Path; diff --git a/src/static_assets/filemap.rs b/src/static_assets/filemap.rs index 9d80bf0..dc56b7a 100644 --- a/src/static_assets/filemap.rs +++ b/src/static_assets/filemap.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2021 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use cache_buster::Files; pub struct FileMap { diff --git a/src/static_assets/mod.rs b/src/static_assets/mod.rs index a8c8161..3297683 100644 --- a/src/static_assets/mod.rs +++ b/src/static_assets/mod.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2021 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + pub mod filemap; pub mod static_files; diff --git a/src/static_assets/static_files.rs b/src/static_assets/static_files.rs index f6ecaed..e2788a9 100644 --- a/src/static_assets/static_files.rs +++ b/src/static_assets/static_files.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2021 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use std::borrow::Cow; use actix_web::body::BoxBody; diff --git a/src/tests-migrate.rs b/src/tests-migrate.rs index b21b85c..fd7aed6 100644 --- a/src/tests-migrate.rs +++ b/src/tests-migrate.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2021 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use std::env; use sqlx::postgres::PgPoolOptions; diff --git a/src/tests.rs b/src/tests.rs index 9c168b0..1248787 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2021 Aravinth Manivannan - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ +// Copyright (C) 2021 Aravinth Manivannan +// SPDX-FileCopyrightText: 2023 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use std::str::FromStr; use std::sync::Arc; From 241ccab5fca85d1f92750b7e42a8ad60c93c8c9d Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Wed, 1 Nov 2023 17:59:02 +0530 Subject: [PATCH 2/3] fix: use vendored openssl --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 67b6feb..a8ae540 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -73,7 +73,7 @@ tera = { version="1.17.1", features=["builtins"]} tokio = { version = "1.25.0", features = ["fs", "macros"] } csv-async = { version = "1.2.5", features = ["serde", "tokio"] } async-trait = "0.1.68" -reqwest = { version = "0.11.18", features = ["json", "gzip"] } +reqwest = { version = "0.11.18", features = ["json", "gzip", "native-tls-vendored"] } #tokio = "1.11.0" From 76075099befdcf78454c7ed7b99ecb79502bcc5b Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Wed, 1 Nov 2023 19:30:26 +0530 Subject: [PATCH 3/3] fix: CI: install libssl-dev --- .woodpecker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 2f1fb48..30cdf8e 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -8,7 +8,7 @@ pipeline: - COMPILED_DATE=2021-07-21 commands: - apt-get update - - apt-get install -y ca-certificates curl gnupg tar wget + - apt-get install -y ca-certificates curl gnupg tar wget libssl-dev - mkdir -p /etc/apt/keyrings - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg - NODE_MAJOR=18 echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list