mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-05-16 00:11:35 +00:00
Allow to POST pages from a browser plugin to Part-DB so it can retrieve it later
This commit is contained in:
parent
6a3be77ec0
commit
e33c13ecfa
7 changed files with 303 additions and 14 deletions
|
|
@ -175,15 +175,15 @@ final class PartInfoRetriever
|
|||
*/
|
||||
public function dtoToPart(PartDetailDTO $search_result): Part
|
||||
{
|
||||
return $this->createPart($search_result->provider_key, $search_result->provider_id);
|
||||
return $this->dto_to_entity_converter->convertPart($search_result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the given details to create a part entity
|
||||
*/
|
||||
public function createPart(string $provider_key, string $part_id): Part
|
||||
public function createPart(string $provider_key, string $part_id, array $options): Part
|
||||
{
|
||||
$details = $this->getDetails($provider_key, $part_id);
|
||||
$details = $this->getDetails($provider_key, $part_id, $options);
|
||||
|
||||
return $this->dto_to_entity_converter->convertPart($details);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue