You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
384 B
15 lines
384 B
import Module from '../Module.ts'
|
|
import Kernel from '../Kernel.ts'
|
|
import {Request} from '../../Request.ts'
|
|
|
|
export default class PersistSession extends Module {
|
|
public static register(kernel: Kernel) {
|
|
kernel.register(this).last()
|
|
}
|
|
|
|
public async apply(request: Request): Promise<Request> {
|
|
await request.session.persist()
|
|
return request
|
|
}
|
|
}
|