more fixes or whateva!!

master
Matthew 2021-07-03 19:06:32 -04:00
parent 95543ff1a2
commit 570e97ca87
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 1 additions and 5 deletions

View File

@ -8,17 +8,13 @@ export default class Keys extends Route {
}; };
} }
protected pre() { public bind() {
this.router.all('*', (_req, res, next) => { this.router.all('*', (_req, res, next) => {
res.setHeader('Access-Control-Allow-Origin', '*'); res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Allow-Methods', '*'); res.setHeader('Access-Control-Allow-Methods', '*');
res.setHeader('Access-Control-Allow-Headers', '*'); res.setHeader('Access-Control-Allow-Headers', '*');
next(); next();
}); });
}
public bind() {
this.pre();
this.router.get('/x509/:userID', async (req, res) => { this.router.get('/x509/:userID', async (req, res) => {
const memberDoc = await this.server.client.db.Member.findOne({ userID: req.params.userID }).lean().exec(); const memberDoc = await this.server.client.db.Member.findOne({ userID: req.params.userID }).lean().exec();