<s> """<STR_LIT>""" <EOL> from flask import Blueprint , request , g <EOL> import bombolone . core . hash_table <EOL> from bombolone . core . utils import jsonify , set_message <EOL> from bombolone . decorators import get_hash , authentication , check_rank <EOL> MODULE_DIR = '<STR_LIT>' <EOL> api_hash_table = Blueprint ( '<STR_LIT>' , __name__ ) <EOL> @ api_hash_table . route ( '<STR_LIT>' ) <EOL> @ authentication <EOL> @ check_rank ( <NUM_LIT:10> ) <EOL> @ get_hash ( '<STR_LIT>' ) <EOL> def overview ( ) : <EOL> """<STR_LIT>""" <EOL> data = core . hash_table . get_list ( ) <EOL> data = set_message ( data ) <EOL> return jsonify ( data ) <EOL> @ api_hash_table . route ( '<STR_LIT>' ) <EOL> @ authentication <EOL> @ check_rank ( <NUM_LIT:10> ) <EOL> @ get_hash ( '<STR_LIT>' ) <EOL> def get ( ) : <EOL> """<STR_LIT:U+0020>""" <EOL> _id = request . args . get ( "<STR_LIT>" , None ) <EOL> data = core . hash_table . get ( _id ) <EOL> data = set_message ( data ) <EOL> return jsonify ( data ) <EOL> @ api_hash_table . route ( '<STR_LIT>' , methods = [ '<STR_LIT:POST>' ] ) <EOL> @ authentication <EOL> @ check_rank ( <NUM_LIT:10> ) <EOL> @ get_hash ( '<STR_LIT>' ) <EOL> def new ( ) : <EOL> """<STR_LIT>""" <EOL> params = request . json <EOL> data = core . hash_table . new ( params = params ) <EOL> data = set_message ( data ) <EOL> return jsonify ( data ) <EOL> @ api_hash_table . route ( '<STR_LIT>' , methods = [ '<STR_LIT>' ] ) <EOL> @ authentication <EOL> @ check_rank ( <NUM_LIT:10> ) <EOL> def remove ( ) : <EOL> """<STR_LIT>""" <EOL> _id = request . args . get ( "<STR_LIT>" , None ) <EOL> data = core . hash_table . remove ( _id = _id ) <EOL> data = set_message ( data ) <EOL> return jsonify ( data ) <EOL> @ api_hash_table . route ( '<STR_LIT>' , methods = [ '<STR_LIT:POST>' ] ) <EOL> @ authentication <EOL> @ check_rank ( <NUM_LIT:10> ) <EOL> @ get_hash ( '<STR_LIT>' ) <EOL> def update ( ) : <EOL> """<STR_LIT:U+0020>""" <EOL> params = request . json <EOL> data = core . hash_table . update ( params = params , my_rank = g . my [ '<STR_LIT>' ] ) <EOL> data = set_message ( data ) <EOL> return jsonify ( data ) </s>
