Standard Format Code Changes
This commit is contained in:
1 parent
4ce8cde5b0
commit
37028e34ad
33 files changed
+175
-232
No files matched your search
+4
-4
@@ -5,17 +5,17 @@ import schema from './schema'
|
||||
import mongoose from 'mongoose'
|
||||
import cors from 'cors'
|
||||
import logger from './config/logger'
|
||||
import wrongPreshared from './errors/notAllowed.json';
|
||||
import wrongPreshared from './errors/notAllowed.json'
|
||||
|
||||
const app = express()
|
||||
|
||||
app.post('/graphql', (req, res, next) => {
|
||||
if (req.headers.preshared === process.env.OPERATIONS_API_PRESHARED) {
|
||||
next();
|
||||
next()
|
||||
} else {
|
||||
res.send(wrongPreshared);
|
||||
res.send(wrongPreshared)
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
// Allow cross origing request
|
||||
app.use(cors())
|
||||
|
||||
Reference in new issue
Block a user