BLOG-105 Implement CRUD functionality for Labels #107

Merged
squid merged 3 commits from BLOG-105_lable_create_and_update_routes into main 2025-08-02 10:46:00 +08:00
3 changed files with 3 additions and 3 deletions
Showing only changes of commit 8f9a32948f - Show all commits

View File

@ -7,7 +7,7 @@ use crate::adapter::delivery::{
#[utoipa::path( #[utoipa::path(
get, get,
path = "/post/all", path = "/post",
tag = "post", tag = "post",
summary = "Get all post information", summary = "Get all post information",
params( params(

View File

@ -9,7 +9,7 @@ use crate::framework::web::{
pub fn configure_post_routes(cfg: &mut web::ServiceConfig) { pub fn configure_post_routes(cfg: &mut web::ServiceConfig) {
cfg.service( cfg.service(
web::scope("/post") web::scope("/post")
.route("/all", web::get().to(get_all_post_info_handler)) .route("", web::get().to(get_all_post_info_handler))
.route("/{id}", web::get().to(get_post_by_id_handler)), .route("/{id}", web::get().to(get_post_by_id_handler)),
); );

View File

@ -7,7 +7,7 @@ export class PostApiServiceImpl implements PostApiService {
constructor(private fetchFn: typeof fetch) {} constructor(private fetchFn: typeof fetch) {}
async getAllPosts(): Promise<PostInfoResponseDto[]> { async getAllPosts(): Promise<PostInfoResponseDto[]> {
const url = new URL('post/all', Environment.API_BASE_URL); const url = new URL('post', Environment.API_BASE_URL);
const response = await this.fetchFn(url.href); const response = await this.fetchFn(url.href);