Skip to content

Commit 5fe7ebf

Browse files
committed
fix(mods): also returns links on get_one
1 parent ce53ba7 commit 5fe7ebf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/endpoints/mods.rs

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ use crate::types::mod_json::ModJson;
1515
use crate::types::models::incompatibility::Incompatibility;
1616
use crate::types::models::mod_entity::{Mod, ModUpdate};
1717
use crate::types::models::mod_gd_version::{GDVersionEnum, VerPlatform};
18+
use crate::types::models::mod_link::ModLinks;
1819
use crate::types::models::mod_version_status::ModVersionStatusEnum;
1920
use crate::webhook::discord::DiscordWebhook;
2021
use actix_web::{get, post, put, web, HttpResponse, Responder};
@@ -121,6 +122,8 @@ pub async fn get(
121122
&mut pool,
122123
)
123124
.await?;
125+
the_mod.links = ModLinks::fetch(&the_mod.id, &mut pool).await?;
126+
124127
for i in &mut the_mod.versions {
125128
i.modify_metadata(data.app_url(), has_extended_permissions);
126129
}

0 commit comments

Comments
 (0)