+119
-14
API.md
+119
-14
API.md
····································
·································+Use the shortened URL to redirect to the original URL. Source tracking via query parameter is supported.···+3. Source tracking is supported both at link creation and during redirection via query parameter
+129
-5
Cargo.lock
+129
-5
Cargo.lock
·············································
·············································
+2
Cargo.toml
+2
Cargo.toml
-18
migrations/20240301000000_initial.sql
-18
migrations/20240301000000_initial.sql
···
···
-15
migrations/20240302000000_auth_and_tracking.sql:
-15
migrations/20240302000000_auth_and_tracking.sql:
···
···
+41
src/auth.rs
+41
src/auth.rs
···
···
+10
-2
src/error.rs
+10
-2
src/error.rs
···
···+AppError::Database(err) => HttpResponse::InternalServerError().json(format!("Database error: {}", err)), // Show actual error
+112
-9
src/handlers.rs
+112
-9
src/handlers.rs
···························
···+use jsonwebtoken::{encode, decode, Header, EncodingKey, DecodingKey, Validation, errors::Error as JwtError};use crate::{error::AppError, models::{AuthResponse, Claims, CreateLink, Link, LoginRequest, RegisterRequest, User, UserResponse}, AppState};························
+5
-2
src/main.rs
+5
-2
src/main.rs
·········
·········
+30
src/migrations/2025125_initial.sql
+30
src/migrations/2025125_initial.sql
···
···
+23
-1
src/models.rs
+23
-1
src/models.rs
······
······