Change forward method to POST
This commit is contained in:
parent
7bc0b794f0
commit
fab9f13ff5
4 changed files with 21 additions and 4 deletions
|
@ -100,7 +100,10 @@ export default {
|
|||
component.jsonData = '';
|
||||
component.isLoading = true;
|
||||
component.exampleCode = '# Example code using the daemon\ncurl \'http://localhost:5279\' --data \'{"method":"resolve","params":{"uri":"' + this.address + '"}}\'';
|
||||
this.$http.get('https://lbry.tech/forward?method=resolve&uri=' + this.address).then(function(response) {
|
||||
this.$http.post('https://lbry.tech/forward', {
|
||||
method: 'resolve',
|
||||
uri: this.address
|
||||
}).then(function(response) {
|
||||
component.isLoading = false;
|
||||
component.jsonData = JSON.stringify(response.body, null, ' ');
|
||||
});
|
||||
|
|
|
@ -202,7 +202,17 @@ export default {
|
|||
component.isLoading = false;
|
||||
component.exampleCode = '';
|
||||
} else {
|
||||
component.$http.get('https://lbry.tech/forward?method=publish&name=' + component.title + '&bid=0.001&file_path=' + response.filename + '&title=' + component.title + '&description=' + component.description + '&language=' + component.language + '&license=' + component.license + '&nsfw=' + component.nsfw).then(function(response) {
|
||||
component.$http.post('https://lbry.tech/forward', {
|
||||
method: 'publish',
|
||||
name: component.title,
|
||||
bid: 0.001,
|
||||
file_path: response.filename,
|
||||
title: component.title,
|
||||
description: component.description,
|
||||
language: component.language,
|
||||
license: component.license,
|
||||
nsfw: component.nsfw
|
||||
}).then(function(response) {
|
||||
component.isLoading = false;
|
||||
component.jsonData = JSON.stringify(response.body, null, ' ');
|
||||
EventBus.$emit('HookFileUploaded', response.body.txid);
|
||||
|
|
|
@ -102,7 +102,11 @@ export default {
|
|||
component.jsonData = '';
|
||||
component.isLoading = true;
|
||||
component.exampleCode = '# Example code using the daemon\ncurl \'http://localhost:5279\' --data \'{"method":"wallet_send","params":{"claim_id":"' + this.address + '","amount":' + this.amount + '}}\'';
|
||||
this.$http.get('https://lbry.tech/forward?method=wallet_send&claim_id=' + this.address + '&amount=' + this.amount).then(function(response) {
|
||||
this.$http.post('https://lbry.tech/forward', {
|
||||
method: 'wallet_send',
|
||||
claim_id: this.address,
|
||||
amount: this.amount
|
||||
}).then(function(response) {
|
||||
component.isLoading = false;
|
||||
component.jsonData = JSON.stringify(response.body, null, ' ');
|
||||
});
|
||||
|
|
|
@ -47,7 +47,7 @@ var textParser = bodyParser.text({
|
|||
limit: '256kb'
|
||||
});
|
||||
|
||||
app.get('/forward', function(req, res) {
|
||||
app.post('/forward', function(req, res) {
|
||||
|
||||
var allowedMethods = ["wallet_send", "resolve", "publish"];
|
||||
|
||||
|
|
Loading…
Reference in a new issue