square-authentication 6.0.1__py3-none-any.whl → 6.0.2__py3-none-any.whl
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.
- square_authentication/routes/profile.py +6 -11
- {square_authentication-6.0.1.dist-info → square_authentication-6.0.2.dist-info}/METADATA +7 -2
- {square_authentication-6.0.1.dist-info → square_authentication-6.0.2.dist-info}/RECORD +5 -5
- {square_authentication-6.0.1.dist-info → square_authentication-6.0.2.dist-info}/WHEEL +0 -0
- {square_authentication-6.0.1.dist-info → square_authentication-6.0.2.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,3 @@
|
|
1
|
-
import os
|
2
1
|
from typing import Annotated
|
3
2
|
|
4
3
|
from fastapi import APIRouter, HTTPException, status, Header, UploadFile
|
@@ -74,21 +73,17 @@ async def update_profile_photo_v0(
|
|
74
73
|
main process
|
75
74
|
"""
|
76
75
|
# uploading to square file store
|
77
|
-
destination_path = os.path.join(
|
78
|
-
"temp", user_id, "profile_photo", profile_photo.filename
|
79
|
-
)
|
80
|
-
os.makedirs(os.path.dirname(destination_path), exist_ok=True)
|
81
|
-
with open(destination_path, "wb") as out_file:
|
82
|
-
content = await profile_photo.read()
|
83
|
-
out_file.write(content)
|
84
76
|
|
85
77
|
file_upload_response = (
|
86
|
-
global_object_square_file_store_helper.
|
87
|
-
|
78
|
+
global_object_square_file_store_helper.upload_file_using_tuple_v0(
|
79
|
+
file=(
|
80
|
+
profile_photo.filename,
|
81
|
+
profile_photo.file,
|
82
|
+
profile_photo.content_type,
|
83
|
+
),
|
88
84
|
system_relative_path="global/users/profile_photos",
|
89
85
|
)
|
90
86
|
)
|
91
|
-
os.remove(destination_path)
|
92
87
|
|
93
88
|
# adding file storage token to user profile
|
94
89
|
old_profile_photo_response = global_object_square_database_helper.get_rows_v0(
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: square_authentication
|
3
|
-
Version: 6.0.
|
3
|
+
Version: 6.0.2
|
4
4
|
Summary: authentication layer for my personal server.
|
5
5
|
Home-page: https://github.com/thepmsquare/square_authentication
|
6
6
|
Author: thePmSquare
|
@@ -23,7 +23,7 @@ Requires-Dist: square_commons>=1.0.0
|
|
23
23
|
Requires-Dist: square_logger>=2.0.0
|
24
24
|
Requires-Dist: square_database_helper>=2.0.0
|
25
25
|
Requires-Dist: square_database_structure>=2.3.1
|
26
|
-
Requires-Dist: square_file_store_helper>=
|
26
|
+
Requires-Dist: square_file_store_helper>=3.0.0
|
27
27
|
Requires-Dist: pytest>=8.0.0
|
28
28
|
Requires-Dist: httpx>=0.27.2
|
29
29
|
Dynamic: author
|
@@ -53,6 +53,11 @@ pip install square_authentication
|
|
53
53
|
|
54
54
|
## changelog
|
55
55
|
|
56
|
+
### v6.0.2
|
57
|
+
|
58
|
+
- bump square_file_store_helper to >=3.0.0.
|
59
|
+
- use upload_file_using_tuple_v0 instead of upload_file_using_path_v0 in update_profile_photo/v0.
|
60
|
+
|
56
61
|
### v6.0.1
|
57
62
|
|
58
63
|
- delete previous profile photo from file store after successfully updating profile photo.
|
@@ -7,12 +7,12 @@ square_authentication/pydantic_models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCe
|
|
7
7
|
square_authentication/pydantic_models/core.py,sha256=qeNETcJv7mnRKGhATOW2bg0NlHuyzvot1dZ1b1qqhwU,610
|
8
8
|
square_authentication/routes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
9
9
|
square_authentication/routes/core.py,sha256=Ui2kJI3DHK1tsb4_cCle8iurZlU__O_nptk2-YLZ2vg,56778
|
10
|
-
square_authentication/routes/profile.py,sha256=
|
10
|
+
square_authentication/routes/profile.py,sha256=7lujohx0YGEssGvxByiFHSvqQ2lHrFzLoR2mt5qcXvs,5378
|
11
11
|
square_authentication/routes/utility.py,sha256=KDr8KdkT0jAGPjfP-b5XXYG7p49WU7J1FiK6oSIckQI,1779
|
12
12
|
square_authentication/utils/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
13
13
|
square_authentication/utils/encryption.py,sha256=WakaiEAgWpTJltxBzqOtv81_DCDKfzJqt60fWSPoNvo,2027
|
14
14
|
square_authentication/utils/token.py,sha256=t-RPBY4cYyT1ro3lkLBTOy2BeRGBfluBVBivL5DLmDg,680
|
15
|
-
square_authentication-6.0.
|
16
|
-
square_authentication-6.0.
|
17
|
-
square_authentication-6.0.
|
18
|
-
square_authentication-6.0.
|
15
|
+
square_authentication-6.0.2.dist-info/METADATA,sha256=QsYhpenajy8LTz3mk0lMbE_y6Dp11mVlKLqCCOVrnlw,4992
|
16
|
+
square_authentication-6.0.2.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
|
17
|
+
square_authentication-6.0.2.dist-info/top_level.txt,sha256=wDssVJIl9KIEJPj5rR3rv4uRI7yCndMBrvHd_6BGXQA,22
|
18
|
+
square_authentication-6.0.2.dist-info/RECORD,,
|
File without changes
|
{square_authentication-6.0.1.dist-info → square_authentication-6.0.2.dist-info}/top_level.txt
RENAMED
File without changes
|