OpenSCAD and CadQuery working together in dev

Still clean up of the backend/lamdas, and there's a conda permission
issue when deploying the Cadquery image
This commit is contained in:
Kurt Hutten
2021-04-18 17:46:03 +10:00
parent 7733694032
commit 35d5c02f96
9 changed files with 60 additions and 90 deletions

View File

@@ -24,7 +24,7 @@ const preflightOptions = (req, _context, callback) => {
callback(null, response)
}
const render = async (req, _context, callback) => {
const preview = async (req, _context, callback) => {
_context.callbackWaitsForEmptyEventLoop = false
const eventBody = Buffer.from(req.body, 'base64').toString('ascii')
console.log(eventBody, 'eventBody')
@@ -55,7 +55,7 @@ const render = async (req, _context, callback) => {
}
}
const exportstl = async (req, _context, callback) => {
const stl = async (req, _context, callback) => {
_context.callbackWaitsForEmptyEventLoop = false
const eventBody = Buffer.from(req.body, 'base64').toString('ascii')
console.log(eventBody, 'eventBody')
@@ -89,7 +89,7 @@ const exportstl = async (req, _context, callback) => {
module.exports = {
health: middy(health).use(cors()),
exportstl: middy(exportstl).use(cors()),
render: middy(render).use(cors()),
stl: middy(stl).use(cors()),
preview: middy(preview).use(cors()),
preflightOptions,
}