crud-mysql 0.1.8__tar.gz → 0.1.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {crud_mysql-0.1.8 → crud_mysql-0.1.9}/PKG-INFO +1 -1
- {crud_mysql-0.1.8 → crud_mysql-0.1.9}/crud_mysql/endpoints.py +4 -2
- {crud_mysql-0.1.8 → crud_mysql-0.1.9}/crud_mysql.egg-info/PKG-INFO +1 -1
- {crud_mysql-0.1.8 → crud_mysql-0.1.9}/setup.py +1 -1
- {crud_mysql-0.1.8 → crud_mysql-0.1.9}/LICENCE +0 -0
- {crud_mysql-0.1.8 → crud_mysql-0.1.9}/README.md +0 -0
- {crud_mysql-0.1.8 → crud_mysql-0.1.9}/crud_mysql/__init__.py +0 -0
- {crud_mysql-0.1.8 → crud_mysql-0.1.9}/crud_mysql/crud_object.py +0 -0
- {crud_mysql-0.1.8 → crud_mysql-0.1.9}/crud_mysql/protect.py +0 -0
- {crud_mysql-0.1.8 → crud_mysql-0.1.9}/crud_mysql/vars.py +0 -0
- {crud_mysql-0.1.8 → crud_mysql-0.1.9}/crud_mysql.egg-info/SOURCES.txt +0 -0
- {crud_mysql-0.1.8 → crud_mysql-0.1.9}/crud_mysql.egg-info/dependency_links.txt +0 -0
- {crud_mysql-0.1.8 → crud_mysql-0.1.9}/crud_mysql.egg-info/requires.txt +0 -0
- {crud_mysql-0.1.8 → crud_mysql-0.1.9}/crud_mysql.egg-info/top_level.txt +0 -0
- {crud_mysql-0.1.8 → crud_mysql-0.1.9}/setup.cfg +0 -0
|
@@ -35,7 +35,7 @@ def get_object(object_type):
|
|
|
35
35
|
except Exception as e:
|
|
36
36
|
return jsonify(f"Invalid path: /{object_type}"), 404
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
@protect()
|
|
39
39
|
@crud.route("/<object_type>", methods=["POST"])
|
|
40
40
|
def create_object(object_type):
|
|
41
41
|
try:
|
|
@@ -53,7 +53,8 @@ def create_object(object_type):
|
|
|
53
53
|
return jsonify({"objectId": object_id}), 201
|
|
54
54
|
else:
|
|
55
55
|
return jsonify("error occured while creating object"), 500
|
|
56
|
-
|
|
56
|
+
|
|
57
|
+
@protect()
|
|
57
58
|
@crud.route("/<object_type>", methods=["PUT"])
|
|
58
59
|
def update_object(object_type):
|
|
59
60
|
try:
|
|
@@ -70,6 +71,7 @@ def update_object(object_type):
|
|
|
70
71
|
crud_object.update_object(object_id, object_info)
|
|
71
72
|
return jsonify(f"Successfully updated {object_type} with id: {object_id}"), 200
|
|
72
73
|
|
|
74
|
+
@protect()
|
|
73
75
|
@crud.route("/<object_type>", methods=["DELETE"])
|
|
74
76
|
def delete_object(object_type):
|
|
75
77
|
try:
|
|
@@ -5,7 +5,7 @@ with open('README.md', encoding='utf-8') as f:
|
|
|
5
5
|
|
|
6
6
|
setup(
|
|
7
7
|
name='crud-mysql',
|
|
8
|
-
version='0.1.
|
|
8
|
+
version='0.1.9',
|
|
9
9
|
packages=find_packages(),
|
|
10
10
|
install_requires=['mysql-connector-python', 'mysql-database', 'flask', 'flask_jwt_extended', 'cryptography', 'PyJWT'],
|
|
11
11
|
author='hanna',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|