forked from geolba/tethys.backend
- add methods for releasing datasets from submitter
- npm updates - side menu with child items - flash messages via HttpContext response (extended via macro)
This commit is contained in:
parent
e0ff71b117
commit
f403c3109f
37 changed files with 1020 additions and 482 deletions
|
@ -1,5 +1,7 @@
|
|||
import type { ApplicationContract } from '@ioc:Adonis/Core/Application';
|
||||
import Hash from '@ioc:Adonis/Core/Hash';
|
||||
import type Hash from '@ioc:Adonis/Core/Hash';
|
||||
// import HttpContextContract from '@ioc:Adonis/Core/HttpContext';
|
||||
import type Response from '@ioc:Adonis/Core/Response';
|
||||
import { LaravelHash } from './HashDriver';
|
||||
|
||||
export default class AppProvider {
|
||||
|
@ -15,6 +17,22 @@ export default class AppProvider {
|
|||
hashInstance.extend('bcrypt', () => {
|
||||
return new LaravelHash();
|
||||
});
|
||||
|
||||
const responseInstance: typeof Response = this.app.container.use('Adonis/Core/Response');
|
||||
responseInstance.macro('flash', function (key: string, message: any) {
|
||||
this.ctx!.session.flash(key, message);
|
||||
return this;
|
||||
});
|
||||
responseInstance.macro('toRoute', function (route: string) {
|
||||
this.redirect().toRoute(route);
|
||||
return this;
|
||||
});
|
||||
// this.app.container.singleton('Adonis/Core/Response', () => {
|
||||
// return FlashResponse;
|
||||
// });
|
||||
|
||||
// this.app.container.singleton('Adonis/Core/HttpContext', () => {
|
||||
// });
|
||||
}
|
||||
|
||||
public async ready() {
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue