File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515use OCA \GDataVaas \Service \TagService ;
1616use OCA \GDataVaas \Service \VerdictService ;
1717use OCP \AppFramework \Bootstrap \IRegistrationContext ;
18+ use OCP \AppFramework \Http \TemplateResponse ;
1819use OCP \EventDispatcher \Event ;
1920use OCP \EventDispatcher \IEventListener ;
2021use 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
You can’t perform that action at this time.
0 commit comments