1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-15 01:25:17 +01:00

change prize submission to new backend route

This commit is contained in:
Tim Daubenschütz 2015-07-15 00:57:31 +02:00
parent 07f4cdd2e1
commit ebfd4339ab
2 changed files with 5 additions and 2 deletions

View File

@ -14,6 +14,8 @@ import ApiUrls from '../../constants/api_urls';
import { getLangText } from '../../utils/lang_utils.js';
import requests from '../../utils/requests';
let PieceSubmitToPrizeForm = React.createClass({
propTypes: {
piece: React.PropTypes.object,
@ -33,7 +35,7 @@ let PieceSubmitToPrizeForm = React.createClass({
return (
<Form
ref='form'
url={ApiUrls.pieces_list}
url={requests.prepareUrl(ApiUrls.piece_submit_to_prize, {piece_id: this.props.piece.id})}
getFormData={this.getFormData}
handleSuccess={this.props.handleSuccess}
buttons={

View File

@ -7,7 +7,8 @@ function getApiUrls(subdomain) {
'pieces_list': AppConstants.apiEndpoint + 'prize/' + subdomain + '/pieces/',
'users_login': AppConstants.apiEndpoint + 'prize/' + subdomain + '/users/login/',
'users_signup': AppConstants.apiEndpoint + 'prize/' + subdomain + '/users/',
'user': AppConstants.apiEndpoint + 'prize/' + subdomain + '/users/'
'user': AppConstants.apiEndpoint + 'prize/' + subdomain + '/users/',
'piece_submit_to_prize': AppConstants.apiEndpoint + 'prize/' + subdomain + '/pieces/${piece_id}/submit/'
};
}