Esempio n. 1
0
    def add_lot_photo(lot_id):
        if not Lot.can_user_edit(user.email(), lot_id):
            raise NoPermissionError()

        a = request.files
        resp = {
            filename: Lot.add_photo(request.files[filename], lot_id)
            for filename in request.files
        }

        return jsonify(resp), 201
Esempio n. 2
0
    def add_lot_photo(lot_id):
        if not Lot.can_user_edit(user.email(), lot_id):
            raise NoPermissionError()

        return jsonify(Lot.add_photo(request.files['file'], lot_id)), 201