mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-12 20:20:41 -05:00
API Mod Download Links
Adds the tracked download links to the API.
This commit is contained in:
parent
f00c1a136b
commit
7559c85276
@ -53,11 +53,8 @@ class ModResource extends JsonResource
|
|||||||
'type' => 'version',
|
'type' => 'version',
|
||||||
'id' => $version->id,
|
'id' => $version->id,
|
||||||
],
|
],
|
||||||
|
|
||||||
// TODO: The download link to the version can be placed here, but I'd like to track the number of
|
|
||||||
// downloads that are made, so we'll need a new route/feature for that. #35
|
|
||||||
'links' => [
|
'links' => [
|
||||||
'self' => $version->link,
|
'self' => $version->downloadUrl(absolute: true),
|
||||||
],
|
],
|
||||||
|
|
||||||
])->toArray(),
|
])->toArray(),
|
||||||
|
@ -28,10 +28,7 @@ class ModVersionResource extends JsonResource
|
|||||||
// $this->description
|
// $this->description
|
||||||
//),
|
//),
|
||||||
|
|
||||||
// TODO: The download link to the version can be placed here, but I'd like to track the number of
|
'link' => $this->downloadUrl(absolute: true),
|
||||||
// downloads that are made, so we'll need a new route/feature for that. #35
|
|
||||||
'link' => $this->link,
|
|
||||||
|
|
||||||
'virus_total_link' => $this->virus_total_link,
|
'virus_total_link' => $this->virus_total_link,
|
||||||
'downloads' => $this->downloads,
|
'downloads' => $this->downloads,
|
||||||
'created_at' => $this->created_at,
|
'created_at' => $this->created_at,
|
||||||
|
@ -36,7 +36,7 @@ class UserResource extends JsonResource
|
|||||||
],
|
],
|
||||||
'includes' => $this->when(
|
'includes' => $this->when(
|
||||||
ApiController::shouldInclude('user_role'),
|
ApiController::shouldInclude('user_role'),
|
||||||
new UserRoleResource($this->role)
|
new UserRoleResource($this->role),
|
||||||
),
|
),
|
||||||
'links' => [
|
'links' => [
|
||||||
'self' => $this->profileUrl(),
|
'self' => $this->profileUrl(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user