online fixes for ruby
This commit is contained in:
@@ -7,6 +7,7 @@ from datetime import datetime
|
||||
import json
|
||||
from src import clogger
|
||||
from src.articles import controller as article_controller
|
||||
from src.sections.controller import controller
|
||||
from src.database import db_session, read_json
|
||||
import flask
|
||||
|
||||
@@ -21,12 +22,8 @@ def index():
|
||||
@section_pages.route("/<int:id>",methods=['PUT'])
|
||||
@section_pages.route("/<int:id>.json",methods=['PUT'])
|
||||
def update(id):
|
||||
section=Section.query.get(id)
|
||||
clogger.info(request.data)
|
||||
a=read_json(request)
|
||||
section.update(a["section"])
|
||||
db_session.commit()
|
||||
return jsonify(section=section)
|
||||
section,errors=controller.update(id,request)
|
||||
return jsonify(section=section, errors=errors)
|
||||
|
||||
|
||||
@section_pages.route("/<int:id>",methods=['GET'])
|
||||
|
||||
Reference in New Issue
Block a user