-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
answers to /api/software/releases/latest like GitHub
- Loading branch information
Showing
9 changed files
with
199 additions
and
29 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Copyright (c) 2024 Ronan LE MEILLAT for SCTG Development | ||
// | ||
// This file is part of the SCTGDesk project. | ||
// | ||
// SCTGDesk is free software: you can redistribute it and/or modify | ||
// it under the terms of the Affero General Public License version 3 as | ||
// published by the Free Software Foundation. | ||
// | ||
// SCTGDesk 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 | ||
// Affero General Public License for more details. | ||
// | ||
// You should have received a copy of the Affero General Public License | ||
// along with SCTGDesk. If not, see <https://www.gnu.org/licenses/agpl-3.0.html>. | ||
use rocket::request::{FromRequest, Outcome, Request}; | ||
use std::{collections::HashMap, convert::Infallible}; | ||
use rocket_okapi::request::OpenApiFromRequest; | ||
use rocket_okapi::gen::OpenApiGenerator; | ||
use rocket_okapi::request::RequestHeaderInput; | ||
use rocket_okapi::OpenApiError; | ||
|
||
pub struct ExtendedRequest{ | ||
pub headers: HashMap<String, String>, | ||
} | ||
|
||
#[rocket::async_trait] | ||
impl<'r> FromRequest<'r> for ExtendedRequest { | ||
type Error = Infallible; | ||
|
||
async fn from_request(request: &'r Request<'_>) -> Outcome<Self, Self::Error> { | ||
let headers_src = request.headers().clone(); | ||
let mut headers:HashMap<String, String> = HashMap::new(); | ||
headers_src.iter().for_each(|k|{ | ||
headers.insert(k.name.to_string().to_lowercase(),k.value.to_string().to_lowercase()); | ||
}); | ||
Outcome::Success(Self { headers }) | ||
} | ||
} | ||
|
||
impl OpenApiFromRequest<'_> for ExtendedRequest { | ||
fn from_request_input(_: &mut OpenApiGenerator, _: std::string::String, _: bool) -> Result<RequestHeaderInput, OpenApiError> { | ||
Ok(RequestHeaderInput::None) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,46 @@ | ||
{ | ||
"name": "template-vitejs-vue3-tailwindcss-fontawesome", | ||
"private": true, | ||
"version": "1.1.99-29", | ||
"version": "0.1.0", | ||
"type": "module", | ||
"scripts": { | ||
"devserver": "npx nodemon -V -w ./src -e js,vue,ts,css,html --exec 'npm run build && node devserver.js'", | ||
"dev": "vite", | ||
"build": "vite build && gulp licenses", | ||
"create-cert": "openssl req -x509 -newkey rsa:4096 -keyout localhost.key -out localhost.pem -sha256 -nodes -days 365", | ||
"preview": "vite preview", | ||
"create-cert": "openssl req -x509 -newkey rsa:4096 -keyout localhost.key -out localhost.pem -sha256 -nodes -days 365" | ||
"devserver": "npx nodemon -V -w ./src -e js,vue,ts,css,html --exec 'npm run build && node devserver.js'", | ||
"build": "vite build && gulp licenses" | ||
}, | ||
"dependencies": { | ||
"vue-router": "^4.3.2", | ||
"@pqina/flip": "^1.8.3", | ||
"pinia": "^2.1.7", | ||
"jdenticon": "^3.3.0", | ||
"@heroicons/vue": "^2.1.3", | ||
"axios": "^1.7.2", | ||
"jdenticon": "^3.3.0", | ||
"@headlessui/vue": "^1.7.22", | ||
"vue": "^3.4.27", | ||
"@pqina/flip": "^1.8.3" | ||
"@headlessui/vue": "^1.7.22", | ||
"vue-router": "^4.3.2" | ||
}, | ||
"devDependencies": { | ||
"nodemon": "^3.1.0", | ||
"@types/glob": "^8.1.0", | ||
"@vitejs/plugin-vue": "^5.0.4", | ||
"typescript": "^5.4.5", | ||
"express": "^4.19.2", | ||
"sass": "^1.77.2", | ||
"vite": "^5.2.11", | ||
"vite-plugin-static-copy": "^1.0.5", | ||
"tailwindcss": "^3.4.3", | ||
"gulp": "^5.0.0", | ||
"gulp-if": "^3.0.0", | ||
"@fullhuman/postcss-purgecss": "^6.0.0", | ||
"npm-check-updates": "^16.14.20", | ||
"ts-node": "^10.9.2", | ||
"autoprefixer": "^10.4.19", | ||
"postcss-purgefonts": "^1.0.2", | ||
"glob": "10.4.1", | ||
"sass": "^1.77.2", | ||
"autoprefixer": "^10.4.19", | ||
"typescript": "^5.4.5", | ||
"npm-check-updates": "^16.14.20", | ||
"gulp-if": "^3.0.0", | ||
"tailwindcss": "^3.4.3", | ||
"gulp-append-prepend": "^1.0.9", | ||
"@tailwindcss/typography": "^0.5.13", | ||
"glob": "10.4.1", | ||
"postcss": "^8.4.38", | ||
"ts-node": "^10.9.2", | ||
"nodemon": "^3.1.0", | ||
"@types/glob": "^8.1.0", | ||
"express": "^4.19.2", | ||
"vite-plugin-static-copy": "^1.0.5", | ||
"@tailwindcss/forms": "^0.5.7", | ||
"postcss": "^8.4.38" | ||
"@vitejs/plugin-vue": "^5.0.4", | ||
"gulp": "^5.0.0" | ||
} | ||
} |