Version fix (#193)

* Version fix

* Workflow fix

* Test fix

* Test fix

* Removing code that was meant to be removed

Caused an extra file to be created when the request is called

* Updated env sample to address workflow

* Removed import

* env fix

* Version change

* Version bump

Going with the version I done earlier. I won't have the versioning match the api version in the endpoints

* Fixing versions for app dependencies
This commit was merged in pull request #193.
This commit is contained in:
KD
2025-10-14 22:02:26 -04:00
committed by GitHub
parent 48a40a4821
commit 2023fc81f8
5 changed files with 16 additions and 19 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
APP_ENV=development
APP_ENV=production
BACKEND_PORT=8000
FRONTEND_URL=http://localhost:4200
RUST_LOG=debug
ALLOWED_ORIGINS=https://soaricarus.com,https://www.soaricarus.com
ALLOWED_ORIGINS=https://soaricarus.com,https://www.soaricarus.com,http://localhost:8000,http://127.0.0.1:8000
SECRET_MAIN_KEY=refero34o8rfhfjn983thf39fhc943rf923n3h
ROOT_DIRECTORY=/home/icarus/mydata
POSTGRES_MAIN_USER=icarus
+4 -4
View File
@@ -2,9 +2,9 @@ name: Rust CI
on:
push:
branches: [ "v0.2" ]
branches: [ "main" ]
pull_request:
branches: [ "v0.2" ]
branches: [ "main" ]
jobs:
build:
@@ -25,7 +25,7 @@ jobs:
--health-retries 5
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Install Rust 1.90.0
uses: actions-rs/toolchain@v1
@@ -69,7 +69,7 @@ jobs:
ROOT_DIRECTORY: "/tmp"
DATABASE_URL: "postgres://${{ secrets.POSTGRES_USER }}:${{ secrets.POSTGRES_PASSWORD }}@localhost:5432/${{ secrets.POSTGRES_DB }}"
run: |
cat .env.sample | head -1 > .env
cat .env.sample | head -6 > .env
cargo test --verbose --
- name: Run clippy
+4
View File
@@ -2,6 +2,10 @@
Web API for the Icarus project.
### Requires
`icarus_auth` +v0.6.0
`songparser` +v0.4.1
## Getting Started
Quickest way to get started is with docker. Make sure `icarus_auth` and `songparser` repositories
are located in the root of the parent directory. Check the respective repositories to ensure they
-7
View File
@@ -869,8 +869,6 @@ mod song_queue {
pub mod endpoint {
use axum::{Json, http::StatusCode, response::IntoResponse};
use std::io::Write;
use crate::callers::song::song_queue;
/// Endpoint to queue a song. Starts the process and places the song in a queue
@@ -907,11 +905,6 @@ pub mod endpoint {
data.len()
);
// TODO: Remove this
// Save the file to disk
let mut file = std::fs::File::create(&file_name).unwrap();
file.write_all(&data).unwrap();
let raw_data: Vec<u8> = data.to_vec();
let queue_repo = song_queue::insert(
&pool,
+6 -6
View File
@@ -335,7 +335,7 @@ mod tests {
pub const LIMIT: usize = 6;
pub async fn get_pool() -> Result<sqlx::PgPool, sqlx::Error> {
let tm_db_url = icarus_envy::environment::get_db_url().await;
let tm_db_url = icarus_envy::environment::get_db_url().await.value;
let tm_options = sqlx::postgres::PgConnectOptions::from_str(&tm_db_url).unwrap();
sqlx::PgPool::connect_with(tm_options).await
}
@@ -348,7 +348,7 @@ mod tests {
}
pub async fn connect_to_db(db_name: &str) -> Result<sqlx::PgPool, sqlx::Error> {
let db_url = icarus_envy::environment::get_db_url().await;
let db_url = icarus_envy::environment::get_db_url().await.value;
let options = sqlx::postgres::PgConnectOptions::from_str(&db_url)?.database(db_name);
sqlx::PgPool::connect_with(options).await
}
@@ -375,7 +375,7 @@ mod tests {
}
pub async fn get_database_name() -> Result<String, Box<dyn std::error::Error>> {
let database_url = icarus_envy::environment::get_db_url().await;
let database_url = icarus_envy::environment::get_db_url().await.value;
let parsed_url = url::Url::parse(&database_url)?;
if parsed_url.scheme() == "postgres" || parsed_url.scheme() == "postgresql" {
@@ -425,7 +425,7 @@ mod tests {
pub const TEST_USER_ID: uuid::Uuid = uuid::uuid!("cc938368-615a-4694-b2ca-6e122fa31c52");
pub async fn test_token() -> Result<String, josekit::JoseError> {
let key: String = icarus_envy::environment::get_secret_main_key().await;
let key: String = icarus_envy::environment::get_secret_main_key().await.value;
let (message, issuer, audience) = token_fields();
let token_resource = icarus_models::token::TokenResource {
@@ -2384,8 +2384,8 @@ mod tests {
..Default::default()
};
match song.to_data() {
Ok(song_data) => match coverart.to_data() {
match icarus_models::song::io::to_data(&song) {
Ok(song_data) => match icarus_models::coverart::io::to_data(&coverart) {
Ok(coverart_data) => Ok((song_data, coverart_data)),
Err(err) => Err(err),
},