mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-12 12:10: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',
|
||||
'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' => [
|
||||
'self' => $version->link,
|
||||
'self' => $version->downloadUrl(absolute: true),
|
||||
],
|
||||
|
||||
])->toArray(),
|
||||
|
@ -28,10 +28,7 @@ class ModVersionResource extends JsonResource
|
||||
// $this->description
|
||||
//),
|
||||
|
||||
// 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
|
||||
'link' => $this->link,
|
||||
|
||||
'link' => $this->downloadUrl(absolute: true),
|
||||
'virus_total_link' => $this->virus_total_link,
|
||||
'downloads' => $this->downloads,
|
||||
'created_at' => $this->created_at,
|
||||
|
@ -36,7 +36,7 @@ class UserResource extends JsonResource
|
||||
],
|
||||
'includes' => $this->when(
|
||||
ApiController::shouldInclude('user_role'),
|
||||
new UserRoleResource($this->role)
|
||||
new UserRoleResource($this->role),
|
||||
),
|
||||
'links' => [
|
||||
'self' => $this->profileUrl(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user