Skip to content

Commit

Permalink
fixup! fixup! feat: Implement assetconfiguration endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusknorr committed Dec 4, 2024
1 parent 0898a02 commit 71074d4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/Controller/RemoteAssetController.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@

class RemoteAssetController extends Controller {

public const SUPPORTED_PRESENTATION_MIMES = [
'application/vnd.oasis.opendocument.presentation',
'application/vnd.oasis.opendocument.presentation-template',
];

public function __construct(
string $appName,
IRequest $request,
Expand Down Expand Up @@ -114,7 +119,9 @@ private function getRemoteAssetData(bool $fontsOnly = false): array {
]),
'version' => $template->getEtag(),
];
}, $this->templateManager->getSystem('presentation'))),
}, array_filter($this->templateManager->getSystem('presentation'), function ($template) {
return in_array($template->getMimeType(), self::SUPPORTED_PRESENTATION_MIMES, true);
}))),
];

return $data;
Expand Down
3 changes: 3 additions & 0 deletions lib/TemplateManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,19 @@ class TemplateManager {

/** Accepted templates mime types */
public const MIMES_DOCUMENTS = [
'application/vnd.oasis.opendocument.text',
'application/vnd.oasis.opendocument.text-template',
'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
'application/msword'
];
public const MIMES_SHEETS = [
'application/vnd.oasis.opendocument.spreadsheet',
'application/vnd.oasis.opendocument.spreadsheet-template',
'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
'application/vnd.ms-excel'
];
public const MIMES_PRESENTATIONS = [
'application/vnd.oasis.opendocument.presentation',
'application/vnd.oasis.opendocument.presentation-template',
'application/vnd.openxmlformats-officedocument.presentationml.template',
'application/vnd.ms-powerpoint'
Expand Down

0 comments on commit 71074d4

Please sign in to comment.