Pablo made a proper button to call the /create task url
This commit is contained in:
@@ -71,9 +71,8 @@ def save(project, task_id):
|
||||
return flask.jsonify({'task_id': task_id, 'etag': task._etag, 'time': task._updated })
|
||||
|
||||
|
||||
# TODO: remove GET method once Pablo has made a proper button to call this URL with a POST.
|
||||
@perproject_blueprint.route('/create', methods=['POST', 'GET'])
|
||||
@perproject_blueprint.route('/create/<task_type>', methods=['POST', 'GET'])
|
||||
@perproject_blueprint.route('/create', methods=['POST'])
|
||||
@perproject_blueprint.route('/create/<task_type>', methods=['POST'])
|
||||
@attract_project_view()
|
||||
def create_task(project, task_type=None):
|
||||
task = current_attract.task_manager.create_task(project, task_type=task_type)
|
||||
|
@@ -64,7 +64,7 @@ script.
|
||||
function task_create() {
|
||||
var base_url = "{{ url_for('attract.tasks.perproject.create_task', project_url=project.url) }}";
|
||||
|
||||
$.get(base_url, function(task_data) {
|
||||
$.post(base_url, function(task_data) {
|
||||
|
||||
task_open(task_data.task_id);
|
||||
|
||||
|
Reference in New Issue
Block a user