Skip to content

Commit

Permalink
Merge pull request #84 from CollaboraOnline/issue-83-refactor-wopi-co…
Browse files Browse the repository at this point in the history
…ntroller

Issue #83: Refactor wopi controller
  • Loading branch information
AaronGilMartinez authored Jan 20, 2025
2 parents 4cdb19b + b6b4a36 commit aea55fb
Show file tree
Hide file tree
Showing 19 changed files with 962 additions and 235 deletions.
18 changes: 9 additions & 9 deletions collabora_online.routing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ collabora-online.settings:
_permission: 'administer site configuration'

collabora-online.wopi.info:
path: '/cool/wopi/files/{id}'
path: '/cool/wopi/files/{media}'
defaults:
_controller: '\Drupal\collabora_online\Controller\WopiController::wopi'
action: 'info'
Expand All @@ -53,11 +53,11 @@ collabora-online.wopi.info:
parameters:
action:
type: string
id:
type: string
media:
type: entity:media

collabora-online.wopi.contents:
path: '/cool/wopi/files/{id}/contents'
path: '/cool/wopi/files/{media}/contents'
defaults:
_controller: '\Drupal\collabora_online\Controller\WopiController::wopi'
action: 'content'
Expand All @@ -69,11 +69,11 @@ collabora-online.wopi.contents:
parameters:
action:
type: string
id:
type: string
media:
type: entity:media

collabora-online.wopi.save:
path: '/cool/wopi/files/{id}/contents'
path: '/cool/wopi/files/{media}/contents'
defaults:
_controller: '\Drupal\collabora_online\Controller\WopiController::wopi'
action: 'save'
Expand All @@ -85,5 +85,5 @@ collabora-online.wopi.save:
parameters:
action:
type: string
id:
type: string
media:
type: entity:media
1 change: 1 addition & 0 deletions collabora_online.services.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
services:
_defaults:
autowire: true
autoconfigure: true
logger.channel.collabora_online:
parent: logger.channel_base
arguments: ['cool']
Expand Down
2 changes: 1 addition & 1 deletion src/Access/WopiProofAccessCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ protected function getSubject(Request $request): string {
pack('N', strlen($url)),
strtoupper($url),
pack('N', 8),
pack('J', $timestamp_ticks)
pack('J', $timestamp_ticks),
);
}

Expand Down
Loading

0 comments on commit aea55fb

Please sign in to comment.