def create_bulletin(): # uid = get_uid() # if uid is None: # return response(403, message='not login') result = bc.create(request.form, get_uid()) return jsonify(result), 200
def delete_bulletin(bid): uid = get_uid() if uid is None: return response(403, message='not login') result = bc.destroy(bid, uid) if result == 403: return response(403, message='current user is not the author') else: return '', 204
def delete_event(eid): # uid = get_uid() # if uid is None: # return response(403, message='not login') result = ec.destroy(eid, get_uid()) if result == 403: return response(403, message='current user is not the author') else: return '', 204
def update_bulletin(bid): # uid = get_uid() # if uid is None: # return response(403, message='not login') result = bc.update(bid, request.form, get_uid()) if result == 403: return response(403, message='current user is not the author') elif result == 402: return response(402, message='patch content error') elif result is not None: return jsonify(result), 200 else: return {'message': 'PATCH failed'}, 402
def delete_follow_event(eid): # uid = get_uid() # if uid is None: # return response(403, message='not login') return '', ec.destroy_follow(eid, get_uid())