diff --git a/.gitignore b/.gitignore index 666a358e..43270457 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ coverage dist assets yarn-error.log +src/cache_buster_data.json.license +**/**/target diff --git a/Dockerfile b/Dockerfile index 4dcb3c8d..84114d24 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: 2023 Aravinth Manivannan +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +FROM node:16.0.0 as frontend FROM node:18.0.0 as frontend RUN set -ex; \ apt-get update; \ diff --git a/LICENSES/Apache-2.0.txt b/LICENSES/Apache-2.0.txt new file mode 100644 index 00000000..137069b8 --- /dev/null +++ b/LICENSES/Apache-2.0.txt @@ -0,0 +1,73 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Makefile b/Makefile index 78e9b498..79902191 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2023 Aravinth Manivannan +# +# SPDX-License-Identifier: AGPL-3.0-or-later + BUNDLE = static/cache/bundle OPENAPI = docs/openapi CLEAN_UP = $(BUNDLE) src/cache_buster_data.json assets diff --git a/build.rs b/build.rs index 19fb1449..6da61a7b 100644 --- a/build.rs +++ b/build.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::process::Command; use sqlx::types::time::OffsetDateTime; diff --git a/db/db-core/src/errors.rs b/db/db-core/src/errors.rs index 140d8436..8690ec4c 100644 --- a/db/db-core/src/errors.rs +++ b/db/db-core/src/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 + //! represents all the ways a trait can fail using this crate use std::error::Error as StdError; diff --git a/db/db-core/src/lib.rs b/db/db-core/src/lib.rs index ad23e77a..67c254da 100644 --- a/db/db-core/src/lib.rs +++ b/db/db-core/src/lib.rs @@ -1,19 +1,7 @@ -/* - * 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 #![warn(missing_docs)] //! # `mCaptcha` database operations diff --git a/db/db-core/src/ops.rs b/db/db-core/src/ops.rs index f227147a..e3ddc775 100644 --- a/db/db-core/src/ops.rs +++ b/db/db-core/src/ops.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 + //! meta operations like migration and connecting to a database use crate::dev::*; diff --git a/db/db-core/src/tests.rs b/db/db-core/src/tests.rs index ceb87393..283e47b6 100644 --- a/db/db-core/src/tests.rs +++ b/db/db-core/src/tests.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 + //! Test utilities use crate::errors::*; use crate::prelude::*; diff --git a/db/db-migrations/src/main.rs b/db/db-migrations/src/main.rs index 5c16e71a..64957a17 100644 --- a/db/db-migrations/src/main.rs +++ b/db/db-migrations/src/main.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::env; use sqlx::postgres::PgPoolOptions; diff --git a/db/db-sqlx-maria/migrations/20210310122154_mcaptcha_users.sql b/db/db-sqlx-maria/migrations/20210310122154_mcaptcha_users.sql index c62a8d26..3f7b945f 100644 --- a/db/db-sqlx-maria/migrations/20210310122154_mcaptcha_users.sql +++ b/db/db-sqlx-maria/migrations/20210310122154_mcaptcha_users.sql @@ -1,3 +1,7 @@ +-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan +-- +-- SPDX-License-Identifier: AGPL-3.0-or-later + CREATE TABLE IF NOT EXISTS mcaptcha_users ( name VARCHAR(100) NOT NULL UNIQUE, email VARCHAR(100) UNIQUE DEFAULT NULL, diff --git a/db/db-sqlx-maria/migrations/20210310122617_mcaptcha_config.sql b/db/db-sqlx-maria/migrations/20210310122617_mcaptcha_config.sql index 091f9a82..05dd4557 100644 --- a/db/db-sqlx-maria/migrations/20210310122617_mcaptcha_config.sql +++ b/db/db-sqlx-maria/migrations/20210310122617_mcaptcha_config.sql @@ -1,3 +1,7 @@ +-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan +-- +-- SPDX-License-Identifier: AGPL-3.0-or-later + -- TODO: changed key -> captcha_key CREATE TABLE IF NOT EXISTS mcaptcha_config ( diff --git a/db/db-sqlx-maria/migrations/20210310122902_mcaptcha_levels.sql b/db/db-sqlx-maria/migrations/20210310122902_mcaptcha_levels.sql index 6e153165..02efde64 100644 --- a/db/db-sqlx-maria/migrations/20210310122902_mcaptcha_levels.sql +++ b/db/db-sqlx-maria/migrations/20210310122902_mcaptcha_levels.sql @@ -1,3 +1,7 @@ +-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan +-- +-- SPDX-License-Identifier: AGPL-3.0-or-later + CREATE TABLE IF NOT EXISTS mcaptcha_levels ( config_id INTEGER NOT NULL, difficulty_factor INTEGER NOT NULL, diff --git a/db/db-sqlx-maria/migrations/20210430032935_mcaptcha_pow_fetched_stats.sql b/db/db-sqlx-maria/migrations/20210430032935_mcaptcha_pow_fetched_stats.sql index 431150fe..fc6b771b 100644 --- a/db/db-sqlx-maria/migrations/20210430032935_mcaptcha_pow_fetched_stats.sql +++ b/db/db-sqlx-maria/migrations/20210430032935_mcaptcha_pow_fetched_stats.sql @@ -1,3 +1,7 @@ +-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan +-- +-- SPDX-License-Identifier: AGPL-3.0-or-later + CREATE TABLE IF NOT EXISTS mcaptcha_pow_fetched_stats ( config_id INTEGER NOT NULL, time timestamp NOT NULL DEFAULT now(), diff --git a/db/db-sqlx-maria/migrations/20210509135118_mcaptcha_pow_solved_stats.sql b/db/db-sqlx-maria/migrations/20210509135118_mcaptcha_pow_solved_stats.sql index d0883c3a..407dcc12 100644 --- a/db/db-sqlx-maria/migrations/20210509135118_mcaptcha_pow_solved_stats.sql +++ b/db/db-sqlx-maria/migrations/20210509135118_mcaptcha_pow_solved_stats.sql @@ -1,3 +1,7 @@ +-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan +-- +-- SPDX-License-Identifier: AGPL-3.0-or-later + CREATE TABLE IF NOT EXISTS mcaptcha_pow_solved_stats ( config_id INTEGER NOT NULL, time timestamp NOT NULL DEFAULT now(), diff --git a/db/db-sqlx-maria/migrations/20210509135154_mcaptcha_pow_confirmed_stats.sql b/db/db-sqlx-maria/migrations/20210509135154_mcaptcha_pow_confirmed_stats.sql index 6aca7f20..73cfc73f 100644 --- a/db/db-sqlx-maria/migrations/20210509135154_mcaptcha_pow_confirmed_stats.sql +++ b/db/db-sqlx-maria/migrations/20210509135154_mcaptcha_pow_confirmed_stats.sql @@ -1,3 +1,7 @@ +-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan +-- +-- SPDX-License-Identifier: AGPL-3.0-or-later + CREATE TABLE IF NOT EXISTS mcaptcha_pow_confirmed_stats ( config_id INTEGER NOT NULL, time timestamp NOT NULL DEFAULT now(), diff --git a/db/db-sqlx-maria/migrations/20210509151150_mcaptcha_notifications.sql b/db/db-sqlx-maria/migrations/20210509151150_mcaptcha_notifications.sql index 50ab18cf..91dd40d3 100644 --- a/db/db-sqlx-maria/migrations/20210509151150_mcaptcha_notifications.sql +++ b/db/db-sqlx-maria/migrations/20210509151150_mcaptcha_notifications.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 mcaptcha_notifications ( id INT auto_increment, diff --git a/db/db-sqlx-maria/migrations/20211202141927_mcaptcha_sitekey_user_provided_avg_traffic.sql b/db/db-sqlx-maria/migrations/20211202141927_mcaptcha_sitekey_user_provided_avg_traffic.sql index b8eb99b1..fcc2bf7f 100644 --- a/db/db-sqlx-maria/migrations/20211202141927_mcaptcha_sitekey_user_provided_avg_traffic.sql +++ b/db/db-sqlx-maria/migrations/20211202141927_mcaptcha_sitekey_user_provided_avg_traffic.sql @@ -1,3 +1,7 @@ +-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan +-- +-- SPDX-License-Identifier: AGPL-3.0-or-later + CREATE TABLE IF NOT EXISTS mcaptcha_sitekey_user_provided_avg_traffic ( config_id INT NOT NULL, PRIMARY KEY(config_id), diff --git a/db/db-sqlx-maria/migrations/20211218133703_change_user_provided_avg_traffic_col_datatype.sql b/db/db-sqlx-maria/migrations/20211218133703_change_user_provided_avg_traffic_col_datatype.sql index 457a3230..abf990a3 100644 --- a/db/db-sqlx-maria/migrations/20211218133703_change_user_provided_avg_traffic_col_datatype.sql +++ b/db/db-sqlx-maria/migrations/20211218133703_change_user_provided_avg_traffic_col_datatype.sql @@ -1,3 +1,7 @@ +-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan +-- +-- SPDX-License-Identifier: AGPL-3.0-or-later + ALTER TABLE mcaptcha_sitekey_user_provided_avg_traffic MODIFY avg_traffic INTEGER NOT NULL, MODIFY peak_sustainable_traffic INTEGER NOT NULL; diff --git a/db/db-sqlx-maria/migrations/20220526114806_alter_notifications_table.sql b/db/db-sqlx-maria/migrations/20220526114806_alter_notifications_table.sql index f3bef072..a7ae354b 100644 --- a/db/db-sqlx-maria/migrations/20220526114806_alter_notifications_table.sql +++ b/db/db-sqlx-maria/migrations/20220526114806_alter_notifications_table.sql @@ -1,2 +1,6 @@ +-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan +-- +-- SPDX-License-Identifier: AGPL-3.0-or-later + -- Add migration script here ALTER TABLE mcaptcha_notifications MODIFY heading varchar(100) NOT NULL; diff --git a/db/db-sqlx-maria/src/errors.rs b/db/db-sqlx-maria/src/errors.rs index 8921b404..a4b40f83 100644 --- a/db/db-sqlx-maria/src/errors.rs +++ b/db/db-sqlx-maria/src/errors.rs @@ -1,19 +1,7 @@ -/* - * 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 //! Error-handling utilities use std::borrow::Cow; diff --git a/db/db-sqlx-maria/src/get_all_unread_notifications.sql b/db/db-sqlx-maria/src/get_all_unread_notifications.sql index 6bd9551a..29cb09ac 100644 --- a/db/db-sqlx-maria/src/get_all_unread_notifications.sql +++ b/db/db-sqlx-maria/src/get_all_unread_notifications.sql @@ -1,3 +1,7 @@ +-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan +-- +-- SPDX-License-Identifier: AGPL-3.0-or-later + -- gets all unread notifications a user has SELECT mcaptcha_notifications.id, diff --git a/db/db-sqlx-maria/src/lib.rs b/db/db-sqlx-maria/src/lib.rs index 0652755f..f3b0f7a8 100644 --- a/db/db-sqlx-maria/src/lib.rs +++ b/db/db-sqlx-maria/src/lib.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::str::FromStr; use db_core::dev::*; diff --git a/db/db-sqlx-maria/src/mark_notification_read.sql b/db/db-sqlx-maria/src/mark_notification_read.sql index 9a19e0bb..2a927c68 100644 --- a/db/db-sqlx-maria/src/mark_notification_read.sql +++ b/db/db-sqlx-maria/src/mark_notification_read.sql @@ -1,3 +1,7 @@ +-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan +-- +-- SPDX-License-Identifier: AGPL-3.0-or-later + -- mark a notification as read UPDATE mcaptcha_notifications SET read_notification = TRUE diff --git a/db/db-sqlx-maria/src/tests.rs b/db/db-sqlx-maria/src/tests.rs index 62fe290f..2fee47ba 100644 --- a/db/db-sqlx-maria/src/tests.rs +++ b/db/db-sqlx-maria/src/tests.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 + #![cfg(test)] use sqlx::mysql::MySqlPoolOptions; diff --git a/db/db-sqlx-postgres/migrations/20210310122154_mcaptcha_users.sql b/db/db-sqlx-postgres/migrations/20210310122154_mcaptcha_users.sql index 79e230aa..2f652fce 100644 --- a/db/db-sqlx-postgres/migrations/20210310122154_mcaptcha_users.sql +++ b/db/db-sqlx-postgres/migrations/20210310122154_mcaptcha_users.sql @@ -1,3 +1,7 @@ +-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan +-- +-- SPDX-License-Identifier: AGPL-3.0-or-later + CREATE TABLE IF NOT EXISTS mcaptcha_users ( name VARCHAR(100) NOT NULL UNIQUE, email VARCHAR(100) UNIQUE DEFAULT NULL, diff --git a/db/db-sqlx-postgres/migrations/20210310122617_mcaptcha_config.sql b/db/db-sqlx-postgres/migrations/20210310122617_mcaptcha_config.sql index ba2dc9d6..7d66da63 100644 --- a/db/db-sqlx-postgres/migrations/20210310122617_mcaptcha_config.sql +++ b/db/db-sqlx-postgres/migrations/20210310122617_mcaptcha_config.sql @@ -1,3 +1,7 @@ +-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan +-- +-- SPDX-License-Identifier: AGPL-3.0-or-later + CREATE TABLE IF NOT EXISTS mcaptcha_config ( config_id SERIAL PRIMARY KEY NOT NULL, user_id INTEGER NOT NULL references mcaptcha_users(ID) ON DELETE CASCADE, diff --git a/db/db-sqlx-postgres/migrations/20210310122902_mcaptcha_levels.sql b/db/db-sqlx-postgres/migrations/20210310122902_mcaptcha_levels.sql index e04963ac..6a7c8c15 100644 --- a/db/db-sqlx-postgres/migrations/20210310122902_mcaptcha_levels.sql +++ b/db/db-sqlx-postgres/migrations/20210310122902_mcaptcha_levels.sql @@ -1,3 +1,7 @@ +-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan +-- +-- SPDX-License-Identifier: AGPL-3.0-or-later + CREATE TABLE IF NOT EXISTS mcaptcha_levels ( config_id INTEGER references mcaptcha_config(config_id) ON DELETE CASCADE, difficulty_factor INTEGER NOT NULL, diff --git a/db/db-sqlx-postgres/migrations/20210430032935_mcaptcha_pow_fetched_stats.sql b/db/db-sqlx-postgres/migrations/20210430032935_mcaptcha_pow_fetched_stats.sql index 0a770f42..c76e83d5 100644 --- a/db/db-sqlx-postgres/migrations/20210430032935_mcaptcha_pow_fetched_stats.sql +++ b/db/db-sqlx-postgres/migrations/20210430032935_mcaptcha_pow_fetched_stats.sql @@ -1,3 +1,7 @@ +-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan +-- +-- SPDX-License-Identifier: AGPL-3.0-or-later + CREATE TABLE IF NOT EXISTS mcaptcha_pow_fetched_stats ( config_id INTEGER references mcaptcha_config(config_id) ON DELETE CASCADE, time timestamptz NOT NULL DEFAULT now() diff --git a/db/db-sqlx-postgres/migrations/20210509135118_mcaptcha_pow_solved_stats.sql b/db/db-sqlx-postgres/migrations/20210509135118_mcaptcha_pow_solved_stats.sql index 1f9d7214..44dae362 100644 --- a/db/db-sqlx-postgres/migrations/20210509135118_mcaptcha_pow_solved_stats.sql +++ b/db/db-sqlx-postgres/migrations/20210509135118_mcaptcha_pow_solved_stats.sql @@ -1,3 +1,7 @@ +-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan +-- +-- SPDX-License-Identifier: AGPL-3.0-or-later + CREATE TABLE IF NOT EXISTS mcaptcha_pow_solved_stats ( config_id INTEGER references mcaptcha_config(config_id) ON DELETE CASCADE, time timestamptz NOT NULL DEFAULT now() diff --git a/db/db-sqlx-postgres/migrations/20210509135154_mcaptcha_pow_confirmed_stats.sql b/db/db-sqlx-postgres/migrations/20210509135154_mcaptcha_pow_confirmed_stats.sql index 348c7008..f68d7c1f 100644 --- a/db/db-sqlx-postgres/migrations/20210509135154_mcaptcha_pow_confirmed_stats.sql +++ b/db/db-sqlx-postgres/migrations/20210509135154_mcaptcha_pow_confirmed_stats.sql @@ -1,3 +1,7 @@ +-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan +-- +-- SPDX-License-Identifier: AGPL-3.0-or-later + CREATE TABLE IF NOT EXISTS mcaptcha_pow_confirmed_stats ( config_id INTEGER references mcaptcha_config(config_id) ON DELETE CASCADE, time timestamptz NOT NULL DEFAULT now() diff --git a/db/db-sqlx-postgres/migrations/20210509151150_mcaptcha_notifications.sql b/db/db-sqlx-postgres/migrations/20210509151150_mcaptcha_notifications.sql index 56e5e733..0dbe05cf 100644 --- a/db/db-sqlx-postgres/migrations/20210509151150_mcaptcha_notifications.sql +++ b/db/db-sqlx-postgres/migrations/20210509151150_mcaptcha_notifications.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 mcaptcha_notifications ( id SERIAL PRIMARY KEY NOT NULL, diff --git a/db/db-sqlx-postgres/migrations/20211202141927_mcaptcha_sitekey_user_provided_avg_traffic.sql b/db/db-sqlx-postgres/migrations/20211202141927_mcaptcha_sitekey_user_provided_avg_traffic.sql index 0c8697e2..d7a62e1e 100644 --- a/db/db-sqlx-postgres/migrations/20211202141927_mcaptcha_sitekey_user_provided_avg_traffic.sql +++ b/db/db-sqlx-postgres/migrations/20211202141927_mcaptcha_sitekey_user_provided_avg_traffic.sql @@ -1,3 +1,7 @@ +-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan +-- +-- SPDX-License-Identifier: AGPL-3.0-or-later + CREATE TABLE IF NOT EXISTS mcaptcha_sitekey_user_provided_avg_traffic ( config_id INTEGER PRIMARY KEY UNIQUE NOT NULL references mcaptcha_config(config_id) ON DELETE CASCADE, avg_traffic INTEGER DEFAULT NULL, diff --git a/db/db-sqlx-postgres/migrations/20211218133703_change_user_provided_avg_traffic_col_datatype.sql b/db/db-sqlx-postgres/migrations/20211218133703_change_user_provided_avg_traffic_col_datatype.sql index 4d2aa195..4a88b583 100644 --- a/db/db-sqlx-postgres/migrations/20211218133703_change_user_provided_avg_traffic_col_datatype.sql +++ b/db/db-sqlx-postgres/migrations/20211218133703_change_user_provided_avg_traffic_col_datatype.sql @@ -1,3 +1,7 @@ +-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan +-- +-- SPDX-License-Identifier: AGPL-3.0-or-later + ALTER TABLE mcaptcha_sitekey_user_provided_avg_traffic ALTER COLUMN avg_traffic SET NOT NULL, ALTER COLUMN peak_sustainable_traffic SET NOT NULL; diff --git a/db/db-sqlx-postgres/migrations/20220526114806_alter_notifications_table.sql b/db/db-sqlx-postgres/migrations/20220526114806_alter_notifications_table.sql index 78eca31b..2f12b6b8 100644 --- a/db/db-sqlx-postgres/migrations/20220526114806_alter_notifications_table.sql +++ b/db/db-sqlx-postgres/migrations/20220526114806_alter_notifications_table.sql @@ -1,3 +1,7 @@ +-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan +-- +-- SPDX-License-Identifier: AGPL-3.0-or-later + -- Add migration script here ALTER TABLE mcaptcha_notifications ALTER COLUMN heading TYPE varchar(100), ALTER COLUMN heading SET NOT NULL; diff --git a/db/db-sqlx-postgres/src/errors.rs b/db/db-sqlx-postgres/src/errors.rs index 00e3b333..e3503fa2 100644 --- a/db/db-sqlx-postgres/src/errors.rs +++ b/db/db-sqlx-postgres/src/errors.rs @@ -1,19 +1,7 @@ -/* - * 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 //! Error-handling utilities use std::borrow::Cow; diff --git a/db/db-sqlx-postgres/src/get_all_unread_notifications.sql b/db/db-sqlx-postgres/src/get_all_unread_notifications.sql index 49fd614e..5dbc6717 100644 --- a/db/db-sqlx-postgres/src/get_all_unread_notifications.sql +++ b/db/db-sqlx-postgres/src/get_all_unread_notifications.sql @@ -1,3 +1,7 @@ +-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan +-- +-- SPDX-License-Identifier: AGPL-3.0-or-later + -- gets all unread notifications a user has SELECT mcaptcha_notifications.id, diff --git a/db/db-sqlx-postgres/src/lib.rs b/db/db-sqlx-postgres/src/lib.rs index 2ee8f85c..dd6d0c9d 100644 --- a/db/db-sqlx-postgres/src/lib.rs +++ b/db/db-sqlx-postgres/src/lib.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::str::FromStr; use db_core::dev::*; diff --git a/db/db-sqlx-postgres/src/mark_notification_read.sql b/db/db-sqlx-postgres/src/mark_notification_read.sql index 97ff3267..1c84da0a 100644 --- a/db/db-sqlx-postgres/src/mark_notification_read.sql +++ b/db/db-sqlx-postgres/src/mark_notification_read.sql @@ -1,3 +1,7 @@ +-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan +-- +-- SPDX-License-Identifier: AGPL-3.0-or-later + -- mark a notification as read UPDATE mcaptcha_notifications SET read = TRUE diff --git a/db/db-sqlx-postgres/src/tests.rs b/db/db-sqlx-postgres/src/tests.rs index ac098278..a7bd4390 100644 --- a/db/db-sqlx-postgres/src/tests.rs +++ b/db/db-sqlx-postgres/src/tests.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 + #![cfg(test)] use sqlx::postgres::PgPoolOptions; diff --git a/docker-compose.yml b/docker-compose.yml index 88a747d4..1b0dc5c7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2023 Aravinth Manivannan +# +# SPDX-License-Identifier: AGPL-3.0-or-later + version: "3.9" services: diff --git a/docs/openapi/openapi.yaml b/docs/openapi/openapi.yaml index 82180b01..8a543c46 100644 --- a/docs/openapi/openapi.yaml +++ b/docs/openapi/openapi.yaml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2023 Aravinth Manivannan +# +# SPDX-License-Identifier: AGPL-3.0-or-later + openapi: 3.0.0 info: version: 0.1.0 diff --git a/scripts/cachebust.sh b/scripts/cachebust.sh index ab5a5ee1..bcbb25ba 100755 --- a/scripts/cachebust.sh +++ b/scripts/cachebust.sh @@ -1,5 +1,9 @@ #!/bin/bash +# SPDX-FileCopyrightText: 2023 Aravinth Manivannan +# +# SPDX-License-Identifier: AGPL-3.0-or-later + set -Eeuo pipefail trap cleanup SIGINT SIGTERM ERR EXIT diff --git a/scripts/integration.sh b/scripts/integration.sh index 880bfe9e..d851adc1 100755 --- a/scripts/integration.sh +++ b/scripts/integration.sh @@ -1,5 +1,9 @@ #!/bin/bash +# SPDX-FileCopyrightText: 2023 Aravinth Manivannan +# +# SPDX-License-Identifier: AGPL-3.0-or-later + set -Eeuo pipefail trap cleanup SIGINT SIGTERM ERR EXIT diff --git a/scripts/lib.sh b/scripts/lib.sh index b5807739..dd874cdb 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -1,5 +1,9 @@ #!/bin/bash +# SPDX-FileCopyrightText: 2023 Aravinth Manivannan +# +# SPDX-License-Identifier: AGPL-3.0-or-later + cleanup() { trap - SIGINT SIGTERM ERR EXIT # script cleanup here diff --git a/scripts/librejs.sh b/scripts/librejs.sh index cfa5a58d..2ac2e75e 100755 --- a/scripts/librejs.sh +++ b/scripts/librejs.sh @@ -1,5 +1,9 @@ #!/bin/bash +# SPDX-FileCopyrightText: 2023 Aravinth Manivannan +# +# SPDX-License-Identifier: AGPL-3.0-or-later + set -Eeuo pipefail trap cleanup SIGINT SIGTERM ERR EXIT diff --git a/scripts/publish.sh b/scripts/publish.sh index de7228a3..7326f203 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -1,18 +1,9 @@ #!/bin/bash + # 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 . +# SPDX-FileCopyrightText: 2023 Aravinth Manivannan +# +# SPDX-License-Identifier: AGPL-3.0-or-later # publish.sh: grab bin from docker container, pack, sign and upload # $2: binary version diff --git a/scripts/tests.sh b/scripts/tests.sh index da6a30c4..88d7bd1c 100755 --- a/scripts/tests.sh +++ b/scripts/tests.sh @@ -1,4 +1,9 @@ #!/bin/bash + +# SPDX-FileCopyrightText: 2023 Aravinth Manivannan +# +# SPDX-License-Identifier: AGPL-3.0-or-later + # hotfix for DB error: too many connections, can't create new client # # I tried running cargo test with the `--jobs` parameter set to 1 but that didn't diff --git a/src/api/mod.rs b/src/api/mod.rs index dcedb932..05b243a9 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -1,18 +1,6 @@ -/* - * 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 pub mod v1; diff --git a/src/api/v1/account/delete.rs b/src/api/v1/account/delete.rs index 89ca5967..cb8e8302 100644 --- a/src/api/v1/account/delete.rs +++ b/src/api/v1/account/delete.rs @@ -1,19 +1,7 @@ -/* - * 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_identity::Identity; use actix_web::{web, HttpResponse, Responder}; diff --git a/src/api/v1/account/email.rs b/src/api/v1/account/email.rs index e9fa7a82..133bd9b7 100644 --- a/src/api/v1/account/email.rs +++ b/src/api/v1/account/email.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_identity::Identity; use actix_web::{web, HttpResponse, Responder}; use db_core::UpdateEmail; diff --git a/src/api/v1/account/mod.rs b/src/api/v1/account/mod.rs index 79c67c94..faa3bd37 100644 --- a/src/api/v1/account/mod.rs +++ b/src/api/v1/account/mod.rs @@ -1,19 +1,7 @@ -/* - * 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 serde::{Deserialize, Serialize}; diff --git a/src/api/v1/account/password.rs b/src/api/v1/account/password.rs index 8db84ebd..ea3705d9 100644 --- a/src/api/v1/account/password.rs +++ b/src/api/v1/account/password.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_identity::Identity; use actix_web::{web, HttpResponse, Responder}; use argon2_creds::Config; diff --git a/src/api/v1/account/secret.rs b/src/api/v1/account/secret.rs index 66b51add..aa63920f 100644 --- a/src/api/v1/account/secret.rs +++ b/src/api/v1/account/secret.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_identity::Identity; use actix_web::{HttpResponse, Responder}; use db_core::prelude::*; diff --git a/src/api/v1/account/test.rs b/src/api/v1/account/test.rs index a4ef7801..f528e06a 100644 --- a/src/api/v1/account/test.rs +++ b/src/api/v1/account/test.rs @@ -1,19 +1,7 @@ -/* - * 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::StatusCode; use actix_web::test; diff --git a/src/api/v1/account/username.rs b/src/api/v1/account/username.rs index 9261adc3..b543607a 100644 --- a/src/api/v1/account/username.rs +++ b/src/api/v1/account/username.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_identity::Identity; use actix_web::{web, HttpResponse, Responder}; use serde::{Deserialize, Serialize}; diff --git a/src/api/v1/auth.rs b/src/api/v1/auth.rs index b320dbc9..fa2b478e 100644 --- a/src/api/v1/auth.rs +++ b/src/api/v1/auth.rs @@ -1,19 +1,7 @@ -/* - * 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_identity::Identity; use actix_web::http::header; diff --git a/src/api/v1/mcaptcha/create.rs b/src/api/v1/mcaptcha/create.rs index 743fb831..863b440e 100644 --- a/src/api/v1/mcaptcha/create.rs +++ b/src/api/v1/mcaptcha/create.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_identity::Identity; use actix_web::{web, HttpResponse, Responder}; use libmcaptcha::defense::Level; diff --git a/src/api/v1/mcaptcha/delete.rs b/src/api/v1/mcaptcha/delete.rs index e5c53da8..c4ba6a36 100644 --- a/src/api/v1/mcaptcha/delete.rs +++ b/src/api/v1/mcaptcha/delete.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_identity::Identity; use actix_web::{web, HttpResponse, Responder}; use libmcaptcha::master::messages::RemoveCaptcha; diff --git a/src/api/v1/mcaptcha/easy.rs b/src/api/v1/mcaptcha/easy.rs index 9707dfc0..65698aef 100644 --- a/src/api/v1/mcaptcha/easy.rs +++ b/src/api/v1/mcaptcha/easy.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_identity::Identity; use actix_web::{web, HttpResponse, Responder}; use libmcaptcha::{defense::Level, defense::LevelBuilder}; diff --git a/src/api/v1/mcaptcha/get.rs b/src/api/v1/mcaptcha/get.rs index 4f2272a4..bd116472 100644 --- a/src/api/v1/mcaptcha/get.rs +++ b/src/api/v1/mcaptcha/get.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_identity::Identity; use actix_web::{web, HttpResponse, Responder}; diff --git a/src/api/v1/mcaptcha/mod.rs b/src/api/v1/mcaptcha/mod.rs index ff8f4909..3cd74953 100644 --- a/src/api/v1/mcaptcha/mod.rs +++ b/src/api/v1/mcaptcha/mod.rs @@ -1,19 +1,7 @@ -/* - * 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 pub mod create; pub mod delete; diff --git a/src/api/v1/mcaptcha/stats.rs b/src/api/v1/mcaptcha/stats.rs index 9db9084d..22c74f50 100644 --- a/src/api/v1/mcaptcha/stats.rs +++ b/src/api/v1/mcaptcha/stats.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_identity::Identity; use actix_web::{web, HttpResponse, Responder}; use serde::{Deserialize, Serialize}; diff --git a/src/api/v1/mcaptcha/test.rs b/src/api/v1/mcaptcha/test.rs index 2b1d43ff..3aab4096 100644 --- a/src/api/v1/mcaptcha/test.rs +++ b/src/api/v1/mcaptcha/test.rs @@ -1,19 +1,7 @@ -/* - * 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::StatusCode; use actix_web::test; diff --git a/src/api/v1/mcaptcha/update.rs b/src/api/v1/mcaptcha/update.rs index 0416338d..750247f1 100644 --- a/src/api/v1/mcaptcha/update.rs +++ b/src/api/v1/mcaptcha/update.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_identity::Identity; use actix_web::{web, HttpResponse, Responder}; use libmcaptcha::defense::Level; diff --git a/src/api/v1/meta.rs b/src/api/v1/meta.rs index 24e148ef..5fd1982f 100644 --- a/src/api/v1/meta.rs +++ b/src/api/v1/meta.rs @@ -1,19 +1,7 @@ -/* - * 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::{web, HttpResponse, Responder}; use derive_builder::Builder; diff --git a/src/api/v1/mod.rs b/src/api/v1/mod.rs index c570cffe..efac059c 100644 --- a/src/api/v1/mod.rs +++ b/src/api/v1/mod.rs @@ -1,19 +1,7 @@ -/* - * 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::Authentication; use actix_web::web::ServiceConfig; diff --git a/src/api/v1/notifications/add.rs b/src/api/v1/notifications/add.rs index 1e47b68c..c18dd4bd 100644 --- a/src/api/v1/notifications/add.rs +++ b/src/api/v1/notifications/add.rs @@ -1,19 +1,7 @@ -/* - * 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_identity::Identity; use actix_web::{web, HttpResponse, Responder}; diff --git a/src/api/v1/notifications/get.rs b/src/api/v1/notifications/get.rs index 57211e01..b257be71 100644 --- a/src/api/v1/notifications/get.rs +++ b/src/api/v1/notifications/get.rs @@ -1,19 +1,7 @@ -/* - * 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_identity::Identity; use actix_web::{HttpResponse, Responder}; diff --git a/src/api/v1/notifications/mark_read.rs b/src/api/v1/notifications/mark_read.rs index 3aeef2fa..706d8878 100644 --- a/src/api/v1/notifications/mark_read.rs +++ b/src/api/v1/notifications/mark_read.rs @@ -1,19 +1,7 @@ -/* - * 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_identity::Identity; use actix_web::{web, HttpResponse, Responder}; diff --git a/src/api/v1/notifications/mod.rs b/src/api/v1/notifications/mod.rs index 1f7c4894..b412d19f 100644 --- a/src/api/v1/notifications/mod.rs +++ b/src/api/v1/notifications/mod.rs @@ -1,19 +1,7 @@ -/* - * 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 pub mod add; pub mod get; diff --git a/src/api/v1/pow/get_config.rs b/src/api/v1/pow/get_config.rs index 131c56ec..80ac1674 100644 --- a/src/api/v1/pow/get_config.rs +++ b/src/api/v1/pow/get_config.rs @@ -1,19 +1,7 @@ -/* - * 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::prelude::*; use actix_web::{web, HttpResponse, Responder}; diff --git a/src/api/v1/pow/mod.rs b/src/api/v1/pow/mod.rs index 932c4d55..d8897ca2 100644 --- a/src/api/v1/pow/mod.rs +++ b/src/api/v1/pow/mod.rs @@ -1,19 +1,7 @@ -/* - * 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::web; diff --git a/src/api/v1/pow/verify_pow.rs b/src/api/v1/pow/verify_pow.rs index f7efd541..78751cd9 100644 --- a/src/api/v1/pow/verify_pow.rs +++ b/src/api/v1/pow/verify_pow.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 + //! PoW Verification module use actix_web::HttpRequest; diff --git a/src/api/v1/pow/verify_token.rs b/src/api/v1/pow/verify_token.rs index bb27b5be..4a8910f3 100644 --- a/src/api/v1/pow/verify_token.rs +++ b/src/api/v1/pow/verify_token.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 + //! PoW success token module use actix_web::{web, HttpResponse, Responder}; diff --git a/src/api/v1/routes.rs b/src/api/v1/routes.rs index 3ee5554d..539a685b 100644 --- a/src/api/v1/routes.rs +++ b/src/api/v1/routes.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::GetLoginRoute; use super::account::routes::Account; diff --git a/src/api/v1/tests/auth.rs b/src/api/v1/tests/auth.rs index b78c9517..67a2928f 100644 --- a/src/api/v1/tests/auth.rs +++ b/src/api/v1/tests/auth.rs @@ -1,19 +1,7 @@ -/* - * 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, StatusCode}; use actix_web::test; diff --git a/src/api/v1/tests/mod.rs b/src/api/v1/tests/mod.rs index 298a9352..cdd1a178 100644 --- a/src/api/v1/tests/mod.rs +++ b/src/api/v1/tests/mod.rs @@ -1,19 +1,7 @@ -/* - * 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 mod auth; mod protected; diff --git a/src/api/v1/tests/protected.rs b/src/api/v1/tests/protected.rs index 41a55401..6bcc4362 100644 --- a/src/api/v1/tests/protected.rs +++ b/src/api/v1/tests/protected.rs @@ -1,19 +1,7 @@ -/* - * 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::StatusCode; use actix_web::test; diff --git a/src/data.rs b/src/data.rs index 6a9b54e8..d9b2b1b1 100644 --- a/src/data.rs +++ b/src/data.rs @@ -1,18 +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 + //! App data: redis cache, database connections, etc. use std::sync::Arc; use std::thread; diff --git a/src/date.rs b/src/date.rs index 2d3a389e..e73c8e7a 100644 --- a/src/date.rs +++ b/src/date.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::Debug; use sqlx::types::time::OffsetDateTime; diff --git a/src/db.rs b/src/db.rs index 0556db39..ccfe1112 100644 --- a/src/db.rs +++ b/src/db.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 crate::settings::Settings; use db_core::prelude::*; diff --git a/src/demo.rs b/src/demo.rs index 5b4e641a..54da1f3c 100644 --- a/src/demo.rs +++ b/src/demo.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::time::Duration; //use std::sync::atomicBool diff --git a/src/docs.rs b/src/docs.rs index d3cbb15a..460e729f 100644 --- a/src/docs.rs +++ b/src/docs.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::borrow::Cow; use actix_web::body::BoxBody; diff --git a/src/email/mod.rs b/src/email/mod.rs index c7d48367..9e2a480c 100644 --- a/src/email/mod.rs +++ b/src/email/mod.rs @@ -1,18 +1,6 @@ -/* - * 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 pub mod verification; diff --git a/src/email/verification.rs b/src/email/verification.rs index 52cdec52..5f7731a2 100644 --- a/src/email/verification.rs +++ b/src/email/verification.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 + //! Email operations: verification, notification, etc use lettre::{ message::{header, MultiPart, SinglePart}, diff --git a/src/errors.rs b/src/errors.rs index da21674a..f8fa590e 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -1,19 +1,7 @@ -/* - * 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::convert::From; diff --git a/src/main.rs b/src/main.rs index ddfc0eb5..17f39298 100644 --- a/src/main.rs +++ b/src/main.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::env; use std::sync::Arc; diff --git a/src/pages/auth/email_verify.rs b/src/pages/auth/email_verify.rs index 9d1e5b23..259cf53f 100644 --- a/src/pages/auth/email_verify.rs +++ b/src/pages/auth/email_verify.rs @@ -1,19 +1,7 @@ -/* - * 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 //! Email operations: verification, notification, etc use lettre::{ diff --git a/src/pages/auth/login.rs b/src/pages/auth/login.rs index 29133f50..e7eb184f 100644 --- a/src/pages/auth/login.rs +++ b/src/pages/auth/login.rs @@ -1,19 +1,7 @@ -/* - * 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::{HttpResponse, Responder}; use lazy_static::lazy_static; diff --git a/src/pages/auth/mod.rs b/src/pages/auth/mod.rs index 801df59f..a4025075 100644 --- a/src/pages/auth/mod.rs +++ b/src/pages/auth/mod.rs @@ -1,19 +1,7 @@ -/* - * 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 pub mod login; pub mod register; diff --git a/src/pages/auth/register.rs b/src/pages/auth/register.rs index 1077fd8c..a4fe407b 100644 --- a/src/pages/auth/register.rs +++ b/src/pages/auth/register.rs @@ -1,19 +1,7 @@ -/* - * 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::{HttpResponse, Responder}; use lazy_static::lazy_static; diff --git a/src/pages/auth/sudo.rs b/src/pages/auth/sudo.rs index 9cb978e3..1439de6b 100644 --- a/src/pages/auth/sudo.rs +++ b/src/pages/auth/sudo.rs @@ -1,19 +1,7 @@ -/* - * 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::Display; diff --git a/src/pages/errors.rs b/src/pages/errors.rs index b241f16d..7ab9af53 100644 --- a/src/pages/errors.rs +++ b/src/pages/errors.rs @@ -1,19 +1,7 @@ -/* - * 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::{web, HttpResponse, Responder}; use lazy_static::lazy_static; diff --git a/src/pages/mod.rs b/src/pages/mod.rs index 25a1c3ff..0fd9580d 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::Authentication; use actix_web::web::ServiceConfig; diff --git a/src/pages/panel/mod.rs b/src/pages/panel/mod.rs index 66cf727a..3b2f285f 100644 --- a/src/pages/panel/mod.rs +++ b/src/pages/panel/mod.rs @@ -1,19 +1,7 @@ -/* - * 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_identity::Identity; use actix_web::{HttpResponse, Responder}; diff --git a/src/pages/panel/notifications.rs b/src/pages/panel/notifications.rs index c3954389..dff4dd28 100644 --- a/src/pages/panel/notifications.rs +++ b/src/pages/panel/notifications.rs @@ -1,19 +1,7 @@ -/* - * 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_identity::Identity; use actix_web::{HttpResponse, Responder}; diff --git a/src/pages/panel/settings.rs b/src/pages/panel/settings.rs index e9cdb0cd..88d13014 100644 --- a/src/pages/panel/settings.rs +++ b/src/pages/panel/settings.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_identity::Identity; use actix_web::{HttpResponse, Responder}; use sailfish::TemplateOnce; diff --git a/src/pages/panel/sitekey/add.rs b/src/pages/panel/sitekey/add.rs index 2022cdf2..d10ddea8 100644 --- a/src/pages/panel/sitekey/add.rs +++ b/src/pages/panel/sitekey/add.rs @@ -1,19 +1,7 @@ -/* - * 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::{HttpResponse, Responder}; use lazy_static::lazy_static; diff --git a/src/pages/panel/sitekey/delete.rs b/src/pages/panel/sitekey/delete.rs index b46a8886..07e35cad 100644 --- a/src/pages/panel/sitekey/delete.rs +++ b/src/pages/panel/sitekey/delete.rs @@ -1,19 +1,7 @@ -/* - * 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::{web, HttpResponse, Responder}; use my_codegen::get; diff --git a/src/pages/panel/sitekey/edit.rs b/src/pages/panel/sitekey/edit.rs index 43cf46f6..50509243 100644 --- a/src/pages/panel/sitekey/edit.rs +++ b/src/pages/panel/sitekey/edit.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_identity::Identity; use actix_web::{http, web, HttpResponse, Responder}; use sailfish::TemplateOnce; diff --git a/src/pages/panel/sitekey/list.rs b/src/pages/panel/sitekey/list.rs index c24a4fb8..b9425373 100644 --- a/src/pages/panel/sitekey/list.rs +++ b/src/pages/panel/sitekey/list.rs @@ -1,19 +1,7 @@ -/* - * 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_identity::Identity; use actix_web::{HttpResponse, Responder}; diff --git a/src/pages/panel/sitekey/login.rs b/src/pages/panel/sitekey/login.rs index 522a43ff..5edb81b0 100644 --- a/src/pages/panel/sitekey/login.rs +++ b/src/pages/panel/sitekey/login.rs @@ -1,19 +1,7 @@ -/* - * 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::{HttpResponse, Responder}; use lazy_static::lazy_static; diff --git a/src/pages/panel/sitekey/mod.rs b/src/pages/panel/sitekey/mod.rs index 4be3fee8..f69f852b 100644 --- a/src/pages/panel/sitekey/mod.rs +++ b/src/pages/panel/sitekey/mod.rs @@ -1,19 +1,7 @@ -/* - * 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 mod add; mod delete; diff --git a/src/pages/panel/sitekey/view.rs b/src/pages/panel/sitekey/view.rs index d83faf88..6983a2b6 100644 --- a/src/pages/panel/sitekey/view.rs +++ b/src/pages/panel/sitekey/view.rs @@ -1,19 +1,7 @@ -/* - * 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_identity::Identity; use actix_web::{web, HttpResponse, Responder}; diff --git a/src/pages/routes.rs b/src/pages/routes.rs index 7b3322ac..3080af36 100644 --- a/src/pages/routes.rs +++ b/src/pages/routes.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::GetLoginRoute; use super::auth::routes::Auth; diff --git a/src/pages/sitemap.rs b/src/pages/sitemap.rs index 1ec9f76d..3547dfba 100644 --- a/src/pages/sitemap.rs +++ b/src/pages/sitemap.rs @@ -1,18 +1,7 @@ -/* - * 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::{HttpResponse, Responder}; use lazy_static::lazy_static; diff --git a/src/routes.rs b/src/routes.rs index cc47968e..5a0ab7ef 100644 --- a/src/routes.rs +++ b/src/routes.rs @@ -1,19 +1,7 @@ -/* - * 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 pub fn services(cfg: &mut actix_web::web::ServiceConfig) { crate::api::v1::services(cfg); diff --git a/src/settings.rs b/src/settings.rs index 133cc5e3..e64b8a67 100644 --- a/src/settings.rs +++ b/src/settings.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::path::Path; use std::{env, fs}; diff --git a/src/static_assets/filemap.rs b/src/static_assets/filemap.rs index 81095bae..e00c3007 100644 --- a/src/static_assets/filemap.rs +++ b/src/static_assets/filemap.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 cache_buster::Files; pub struct FileMap { diff --git a/src/static_assets/mod.rs b/src/static_assets/mod.rs index 60b0fbc1..b32bb282 100644 --- a/src/static_assets/mod.rs +++ b/src/static_assets/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 + pub mod filemap; pub mod static_files; diff --git a/src/static_assets/static_files.rs b/src/static_assets/static_files.rs index 03cef73d..ab91cf5c 100644 --- a/src/static_assets/static_files.rs +++ b/src/static_assets/static_files.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::borrow::Cow; use actix_web::body::BoxBody; diff --git a/src/stats.rs b/src/stats.rs index 466e17cd..6b574850 100644 --- a/src/stats.rs +++ b/src/stats.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 async_trait::async_trait; use db_core::errors::DBResult; use serde::{Deserialize, Serialize}; diff --git a/src/tests/mod.rs b/src/tests/mod.rs index f771417f..89986675 100644 --- a/src/tests/mod.rs +++ b/src/tests/mod.rs @@ -1,19 +1,7 @@ -/* - * 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::test; use actix_web::{ diff --git a/src/widget/mod.rs b/src/widget/mod.rs index ffc17f40..aa7bb7cf 100644 --- a/src/widget/mod.rs +++ b/src/widget/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 + //! User facing CAPTCHA widget use actix_web::{web, HttpResponse, Responder}; use lazy_static::lazy_static; diff --git a/templates/.gitignore b/templates/.gitignore index fc40c5a9..e31ff718 100644 --- a/templates/.gitignore +++ b/templates/.gitignore @@ -1 +1,5 @@ +# SPDX-FileCopyrightText: 2023 Aravinth Manivannan +# +# SPDX-License-Identifier: AGPL-3.0-or-later + /**/*.js diff --git a/templates/_reset.scss b/templates/_reset.scss index 8d05a6c1..02f772fb 100644 --- a/templates/_reset.scss +++ b/templates/_reset.scss @@ -1,12 +1,8 @@ /* - * mCaptcha is a PoW based DoS protection software. - * This is the frontend web component of the mCaptcha system * Copyright © 2023 Aravinth Manivnanan . + * SPDX-FileCopyrightText: 2023 Aravinth Manivannan * - * Use of this source code is governed by Apache 2.0 or MIT license. - * You shoud have received a copy of MIT and Apache 2.0 along with - * this program. If not, see for - * MIT or for Apache. + * SPDX-License-Identifier: MIT OR Apache-2.0 */ * { diff --git a/templates/_vars.scss b/templates/_vars.scss index 40179e0b..d08f68d1 100644 --- a/templates/_vars.scss +++ b/templates/_vars.scss @@ -1,18 +1,8 @@ /* * Copyright (C) 2022 Aravinth Manivannan + * SPDX-FileCopyrightText: 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 . + * SPDX-License-Identifier: AGPL-3.0-or-later */ $green: #5cad66; diff --git a/templates/api/v1/routes.ts b/templates/api/v1/routes.ts index a4a9c11b..6fb19ca7 100644 --- a/templates/api/v1/routes.ts +++ b/templates/api/v1/routes.ts @@ -1,19 +1,7 @@ -/* - * 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 const ROUTES = { registerUser: "/api/v1/signup", diff --git a/templates/auth/captcha/embeded.html b/templates/auth/captcha/embeded.html index 0080c571..ab632d52 100644 --- a/templates/auth/captcha/embeded.html +++ b/templates/auth/captcha/embeded.html @@ -1,4 +1,10 @@ -
+ + +