Skip to content

Commit 6d16635

Browse files
committed
Fix upload message
1 parent 4aac669 commit 6d16635

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

lib/EventListener/FileEventsListener.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use OCA\GDataVaas\Service\TagService;
1616
use OCA\GDataVaas\Service\VerdictService;
1717
use OCP\AppFramework\Bootstrap\IRegistrationContext;
18+
use OCP\AppFramework\Http\TemplateResponse;
1819
use OCP\EventDispatcher\Event;
1920
use OCP\EventDispatcher\IEventListener;
2021
use OCP\Files\Events\Node\NodeWrittenEvent;
@@ -43,8 +44,7 @@ public function __construct(
4344
private readonly IAppConfig $appConfig,
4445
private readonly MailService $mailService,
4546
private readonly ITemplateManager $templateManager
46-
) {
47-
}
47+
) {}
4848

4949
public static function register(IRegistrationContext $context): void {
5050
$context->registerEventListener(NodeWrittenEvent::class, self::class);
@@ -116,11 +116,11 @@ private function sendErrorResponse(Exception $ex): void {
116116

117117
public function generateBody(Exception $ex): string {
118118
if ($this->acceptHtml()) {
119-
$renderAs = 'guest';
119+
$renderAs = TemplateResponse::RENDER_AS_GUEST;
120120
$templateName = 'exception';
121121
} else {
122122
$templateName = 'xml_exception';
123-
$renderAs = null;
123+
$renderAs = TemplateResponse::RENDER_AS_BLANK;
124124
$this->server->httpResponse->setHeader('Content-Type', 'application/xml; charset=utf-8');
125125
}
126126

0 commit comments

Comments
 (0)