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.
27 lines
474 B
27 lines
474 B
// site-common.js
|
|
// Copyright (C) 2022 DTP Technologies, LLC
|
|
// License: Apache-2.0
|
|
|
|
'use strict';
|
|
|
|
const Events = require('events');
|
|
class SiteCommon extends Events {
|
|
|
|
constructor (dtp) {
|
|
super();
|
|
this.dtp = dtp;
|
|
}
|
|
|
|
saveSession (req) {
|
|
return new Promise((resolve, reject) => {
|
|
req.session.save((err) => {
|
|
if (err) {
|
|
return reject(err);
|
|
}
|
|
resolve();
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
module.exports.SiteCommon = SiteCommon;
|