Added some textures.
This commit is contained in:
parent
1c64569d9a
commit
8a2556b773
37
netlify/functions/users/users.ts
Normal file
37
netlify/functions/users/users.ts
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
import {Handler, HandlerContext, HandlerEvent} from "@netlify/functions";
|
||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
|
export const handler: Handler = async (event: HandlerEvent, context: HandlerContext) => {
|
||||||
|
try {
|
||||||
|
const baseurl = 'https://syncdb-service-d3f974de56ef.herokuapp.com/';
|
||||||
|
const more = 'mike/_all_docs?include_docs=true'
|
||||||
|
const dbKey = event.queryStringParameters.shareKey;
|
||||||
|
if (!dbKey) {
|
||||||
|
throw new Error('No share key provided');
|
||||||
|
}
|
||||||
|
const exist = await axios.head(baseurl + dbKey);
|
||||||
|
if (exist.status == 200) {
|
||||||
|
throw new Error('Share key already exists');
|
||||||
|
}
|
||||||
|
const response = await axios.put(
|
||||||
|
baseurl + dbKey,
|
||||||
|
null,
|
||||||
|
{headers: {'Content-Type': 'application/json', 'Accept': 'application/json'}});
|
||||||
|
const data = await response.data;
|
||||||
|
return {
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'Access-Control-Allow-Origin': 'https://cameras.immersiveidea.com',
|
||||||
|
'Access-Control-Allow-Credentials': 'true'
|
||||||
|
},
|
||||||
|
statusCode: 200,
|
||||||
|
body: data
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
|
return {
|
||||||
|
statusCode: 500,
|
||||||
|
body: err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -63,7 +63,7 @@ export class App {
|
|||||||
const spinner = new Spinner(scene);
|
const spinner = new Spinner(scene);
|
||||||
spinner.show();
|
spinner.show();
|
||||||
const config = new AppConfig();
|
const config = new AppConfig();
|
||||||
const peerjsNetworkConnection = new PeerjsNetworkConnection();
|
//const peerjsNetworkConnection = new PeerjsNetworkConnection();
|
||||||
|
|
||||||
//const persistenceManager = new IndexdbPersistenceManager("diagram");
|
//const persistenceManager = new IndexdbPersistenceManager("diagram");
|
||||||
/*const worker = new Worker(workerUrl, {type: 'module'});
|
/*const worker = new Worker(workerUrl, {type: 'module'});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user