|
12 | 12 | use OCA\Files_Sharing\SharedStorage; |
13 | 13 | use OCA\Libresign\AppInfo\Application; |
14 | 14 | use OCA\Libresign\Db\File as FileEntity; |
| 15 | +use OCA\Libresign\Db\FileMapper; |
15 | 16 | use OCA\Libresign\Db\SignRequestMapper; |
16 | 17 | use OCA\Libresign\Exception\LibresignException; |
17 | 18 | use OCA\Libresign\Helper\JSActions; |
@@ -62,6 +63,7 @@ public function __construct( |
62 | 63 | private IUserSession $userSession, |
63 | 64 | private SessionService $sessionService, |
64 | 65 | private SignRequestMapper $signRequestMapper, |
| 66 | + private FileMapper $fileMapper, |
65 | 67 | private IdentifyMethodService $identifyMethodService, |
66 | 68 | private RequestSignatureService $requestSignatureService, |
67 | 69 | private AccountService $accountService, |
@@ -438,16 +440,16 @@ public function save(array $file, string $name = '', array $settings = []): Data |
438 | 440 | 'userManager' => $this->userSession->getUser(), |
439 | 441 | 'status' => FileEntity::STATUS_DRAFT, |
440 | 442 | ]; |
441 | | - $this->requestSignatureService->save($data); |
| 443 | + $file = $this->requestSignatureService->save($data); |
442 | 444 |
|
443 | 445 | return new DataResponse( |
444 | 446 | [ |
445 | 447 | 'message' => $this->l10n->t('Success'), |
446 | 448 | 'name' => $name, |
447 | 449 | 'id' => $node->getId(), |
448 | | - 'etag' => $node->getEtag(), |
449 | | - 'path' => $node->getPath(), |
450 | | - 'type' => $node->getType(), |
| 450 | + 'status' => $file->getStatus(), |
| 451 | + 'statusText' => $this->fileMapper->getTextOfStatus($file->getStatus()), |
| 452 | + 'created_at' => $file->getCreatedAt()->format(\DateTimeInterface::ATOM), |
451 | 453 | ], |
452 | 454 | Http::STATUS_OK |
453 | 455 | ); |
|
0 commit comments