Skip to content

Commit

Permalink
Fix sinfo route HTTP verb and headers
Browse files Browse the repository at this point in the history
Recently, all main API routes use GET instead of POST and the
authentication token use the Authorization HTTP header. Use the same
things for the route /sinfo API route.
  • Loading branch information
rezib committed Feb 8, 2017
1 parent a8387cd commit 26a93af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rest/slurmrestapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,9 @@ def convert_nodeset():
return json.dumps(list(NodeSet(data['nodeset'].encode('ascii', 'ignore'))))


@app.route('/sinfo', methods=['POST', 'OPTIONS'])
@crossdomain(origin=origins, methods=['POST'],
headers=['Accept', 'Content-Type', 'X-Requested-With'])
@app.route('/sinfo', methods=['GET', 'OPTIONS'])
@crossdomain(origin=origins, methods=['GET'],
headers=['Accept', 'Content-Type', 'X-Requested-With', 'Authorization'])
@authentication_verify()
def sinfo():

Expand Down

0 comments on commit 26a93af

Please sign in to comment.