chore: integrate new admin with l-s

This commit is contained in:
Taranto 2020-05-06 22:11:55 +01:00
parent 6b3db134e7
commit bf8f1d991c
72 changed files with 1493 additions and 1611 deletions

View file

@ -59,8 +59,8 @@ apolloServer.applyMiddleware({
// cors on app for /api/register endpoint.
app.use(cors({ credentials: true, origin: devMode && 'https://localhost:3000' }))
app.use('/id-card-photo', serveStatic(idPhotoCardBasedir, {index: false}))
app.use('/front-camera-photo', serveStatic(frontCameraBasedir, {index: false}))
app.use('/id-card-photo', serveStatic(idPhotoCardBasedir, { index: false }))
app.use('/front-camera-photo', serveStatic(frontCameraBasedir, { index: false }))
app.get('/api/register', (req, res, next) => {
const otp = req.query.otp
@ -90,7 +90,7 @@ app.get('/api/register', (req, res, next) => {
})
// Everything not on graphql or api/register is redirected to the front-end
app.get('*', (req, res) => res.sendFile(path.resolve('client', 'build', 'index.html')))
app.get('*', (req, res) => res.sendFile(path.resolve(__dirname, '..', '..', 'public', 'index.html')))
const certOptions = {
key: fs.readFileSync(options.keyPath),