This commit is contained in:
Louis Knight-Webb
2025-06-14 17:52:16 -04:00
parent db95ad11c5
commit dc5bdb37dd
7 changed files with 9 additions and 14 deletions

View File

@@ -60,3 +60,7 @@ bloop/
ts-rs allows you to derive TypeScript types from Rust structs/enums. By annotating your Rust types with #[derive(TS)] and related macros, ts-rs will generate .ts declaration files for those types.
When making changes to the types, you can regenerate them using `npm run generate-types`
Do not manually edit shared/types.ts
# Process
When working on any task that involves changes to the backend and the frontend, start with the backend. If any shared types need to be regenerated, regenerate them before starting the frontend changes.

View File

@@ -1,8 +1,7 @@
use axum::{
async_trait,
extract::FromRequestParts,
http::{request::Parts, StatusCode, HeaderMap},
RequestPartsExt,
http::{request::Parts, StatusCode},
};
use jsonwebtoken::{decode, encode, DecodingKey, EncodingKey, Header, Validation};
use serde::{Deserialize, Serialize};

View File

@@ -3,10 +3,6 @@ use std::path::Path;
use ts_rs::TS;
// Import all the types we want to export using the library crate
use bloop_backend::models::{
ApiResponse, CreateProject, CreateUser, LoginRequest, LoginResponse, Project, UpdateProject,
UpdateUser, UserResponse,
};
fn main() {
let shared_path = Path::new("../shared");

View File

@@ -7,7 +7,6 @@ use axum::{
use sqlx::postgres::PgPoolOptions;
use std::env;
use tower_http::cors::CorsLayer;
use tracing_subscriber;
mod auth;
mod models;

View File

@@ -1,9 +1,6 @@
pub mod user;
pub mod api_response;
pub mod project;
pub mod task;
pub mod api_response;
pub mod user;
pub use user::{User, CreateUser, UpdateUser, LoginRequest, LoginResponse, UserResponse};
pub use project::{Project, CreateProject, UpdateProject};
pub use task::{Task, TaskStatus};
pub use api_response::ApiResponse;

View File

@@ -1,5 +1,5 @@
use axum::{
routing::{get, post, put, delete},
routing::get,
Router,
Json,
response::Json as ResponseJson,

View File

@@ -1,5 +1,5 @@
use axum::{
routing::{get, post, put, delete},
routing::{get, post},
Router,
Json,
response::Json as ResponseJson,