tethys.backend/app/FlashResponse.ts
Arno Kaimbacher 4714dfdd94
All checks were successful
CI Pipeline / japa-tests (push) Successful in 46s
- use latest prettier 3.0 with eslint-plugin-prettier: 5.0.0-alpha.2
- npm normal updates
- add all xslt and style asstes in extra folder public/assets2
- linting corrections
- delete local .env.test from git tracking: git rm --cached .env.test
- add .env.test into .gitignore file
- add edit functionality for editing by submitter
- npm updates
-added xslt3 packeage for builfing sef files
- added Language.ts class vor language table
- added version to datasetxml2oai-pmh.xslt
2023-07-17 19:13:30 +02:00

35 lines
1.1 KiB
TypeScript

import { Response } from '@adonisjs/http-server/build/src/Response';
import { ServerResponse, IncomingMessage } from 'http';
import { RouterContract } from '@ioc:Adonis/Core/Route';
import { EncryptionContract } from '@ioc:Adonis/Core/Encryption';
import { ResponseConfig, ResponseContract } from '@ioc:Adonis/Core/Response';
class FlashResponse extends Response implements ResponseContract {
protected static macros = {};
protected static getters = {};
constructor(
public request: IncomingMessage,
public response: ServerResponse,
flashEncryption: EncryptionContract,
flashConfig: ResponseConfig,
flashRouter: RouterContract,
) {
super(request, response, flashEncryption, flashConfig, flashRouter);
}
public nonce: string;
public flash(key: string, message: any): this {
// Store the flash message in the session
this.ctx?.session.flash(key, message);
return this;
}
public toRoute(route: string): this {
// Redirect to the specified route
super.redirect().toRoute(route);
return this;
}
}
export default FlashResponse;