-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1129 from NFDI4Chem/doi-metadata
feat: enable DataCite metadata update
- Loading branch information
Showing
5 changed files
with
86 additions
and
4 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
app/Http/Controllers/API/Schemas/DataCite/DOIController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers\API\Schemas\DataCite; | ||
|
||
use App\Http\Controllers\Controller; | ||
use App\Services\DOI\DOIService; | ||
use Illuminate\Http\Request; | ||
|
||
class DOIController extends Controller | ||
{ | ||
/** | ||
* Create a new class instance. | ||
* | ||
* @param App\Services\DOI\DOIService $doiService | ||
* @return void | ||
*/ | ||
public function __construct(DOIService $doiService) | ||
{ | ||
$this->doiService = $doiService; | ||
} | ||
|
||
/** | ||
* Update Model's DataCite metadata | ||
* | ||
* @param Illuminate\Http\Request $request | ||
* @param string $identifier | ||
* @return void | ||
*/ | ||
public function update(Request $request, $identifier) | ||
{ | ||
$resolvedModel = resolveIdentifier($identifier); | ||
$model = $resolvedModel['model']; | ||
|
||
// Call the updateDOI function | ||
$model->updateDOIMetadata($this->doiService); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters