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
{ | |
"name": "Upload file", | |
"request": { | |
"url": "https://test.com/api/projects/1216/files", | |
"method": "POST", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"value": "Content-Type: multipart/form-data", | |
"description": "" |
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
var xhr = (window.XMLHttpRequest) ? new XMLHttpRequest() : new activeXObject("Microsoft.XMLHTTP"); | |
var boundary = '---------------------------' + (new Date).getTime(), //boundary is used to specify the encapsulation boundary of a parameter | |
data = "--" + boundary + "\r\n"; | |
data += 'Content-Disposition: form-data; name=file; filename=PL International Test (2) (1) - Page 1; Content-Type=text/csv;\r\n\r\n'; //here we specify the name of the parameter name (data) sent to the server which can be retrieved by $_POST['data'] | |
data += 'file_names=[{\"upload_id\":\"\",\"file_name\":\"PL International Test (2) (1) - Page 1\"}], \r\n' | |
data += 'My Project' + "\r\n"; | |
data += "--" + boundary + "--\r\n"; | |
xhr.open('post', 'https://test.com/api/projects/' + 4079 + '/user_upload_files?smart-suggest=true&update=true', true); | |
xhr.setRequestHeader('Content-Type', 'multipart/form-data; boundary=' + boundary); | |
xhr.setRequestHeader('X-AUTH-TOKEN', token); |
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 Vue from 'vue'; | |
import Component from 'vue-class-component'; | |
import ComponentA from './ComponentA.vue'; | |
import ComponentB from './ComponentB.vue'; | |
@Component({ | |
components: { | |
ComponentA, | |
ComponentB, |
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
if (transactionData.executedQuantity === transactionData.pendingQuantity) { | |
transactionData.pendingTransactionUpdateData = { | |
price: +transactionData.price, | |
payload: transactionData.payload, | |
trade_at: transactionData.trade_at, | |
settlement_at: transactionData.settlement_at | |
} | |
transactionData.cashTransactionUpdateData = { |
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
executeTransaction: function(transactionId, data = {}, t) { | |
data.status = constants.TRANSACTION_STATUS_EXECUTED; | |
return await(models.Transactions.update(data, | |
{ | |
where: { | |
id: transactionId | |
} | |
}, {transaction: t})); | |
} |