This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Test - Send Post Conversion</title> | |
<script type="text/javascript"> | |
(function(w,d,t,r,u){w[u]=w[u]||[];w[u].push({'projectId':'10000','properties':{'pixelId':'10062155'}});var s=d.createElement(t);s.src=r;s.async=true;s.onload=s.onreadystatechange=function(){var y,rs=this.readyState,c=w[u];if(rs&&rs!="complete"&&rs!="loaded"){return}try{y=YAHOO.ywa.I13N.fireBeacon;w[u]=[];w[u].push=function(p){y([p])};y(c)}catch(e){}};var scr=d.getElementsByTagName(t)[0],par=scr.parentNode;par.insertBefore(s,scr)})(window,document,"script","https://s.yimg.com/wi/ytc.js","dotq"); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable no-underscore-dangle, no-param-reassign */ | |
const UserPackage = require('../company/userPackages/userPackages.schema'); | |
const Training = require('../trainings/trainings.schema'); | |
const Request = require('../rfq/request/request.schema'); | |
const Job = require('../jobPosting/jobPosting.schema'); | |
const Company = require('../company/company.schema'); | |
const User = require('./user.schema'); | |
module.exports.mergeUser = (req, res) => { | |
const fromUserId = req.params.from; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
</head> | |
<body> | |
<h1>Test</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
</head> | |
<body> | |
<h1>Test</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const cors = require('cors'); | |
const app = require('express')(); | |
app.use(cors()); | |
const server = require('http').Server(app); | |
const io = require('socket.io')(server, { path: '/octagon/socket.io' }); | |
server.listen(process.env.PORT || 3000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function transferRFQCompany (fromCompanyDetails, toCompanyDetails) { | |
return Request.updateMany({ // updateMany already returns a promise right? no need to wrap it in another promise! | |
"company.id": fromCompanyDetails._id | |
}, { | |
$set: { | |
company: { | |
id: toCompanyDetails._id, | |
name: toCompanyDetails.name, | |
logo: toCompanyDetails.logo | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onSaveClicked = () => { | |
const options = { | |
crossDomain: true, | |
credentials: 'include', | |
method: 'PUT', | |
headers: { | |
'Content-Type': 'application/json', | |
}, | |
body: { | |
filename: this.state.name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UserConnector from './user' | |
import sinon from 'sinon' | |
import mongoose from 'mongoose' | |
import UserModel from '../../models/user' | |
describe("User connector", () => { | |
it("should register user", async () => { | |
const expectedUser = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
functions: | |
my_func: | |
handler: handler.my_func | |
events: | |
- http: | |
path: my_func | |
method: get | |
cors: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const UserController = { | |
get(req, res, next) { | |
try { | |
new Promise(resolve => setTimeout(() => resolve({ success: true }), 5000)) | |
.then(res.json) | |
.catch(res.json); | |
} catch (e) { | |
next(e); | |
} | |
}, |