square-administration 3.0.0__py3-none-any.whl → 3.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.
@@ -12,7 +12,7 @@ from square_database_structure.square import global_string_database_name
12
12
  from square_database_structure.square.authentication import (
13
13
  global_string_schema_name as global_string_schema_name_authentication,
14
14
  )
15
- from square_database_structure.square.authentication.tables import UserCredential
15
+ from square_database_structure.square.authentication.tables import UserProfile
16
16
  from square_database_structure.square.greeting import global_string_schema_name
17
17
  from square_database_structure.square.greeting.tables import Greeting
18
18
 
@@ -77,33 +77,29 @@ async def get_all_greetings_v0(
77
77
  for x in response["data"]["main"]
78
78
  if x[Greeting.user_id.name] is not None
79
79
  }
80
- user_credentials_response = global_object_square_database_helper.get_rows_v0(
80
+ user_profile_response = global_object_square_database_helper.get_rows_v0(
81
81
  database_name=global_string_database_name,
82
82
  schema_name=global_string_schema_name_authentication,
83
- table_name=UserCredential.__tablename__,
83
+ table_name=UserProfile.__tablename__,
84
84
  filters=FiltersV0(
85
85
  root={
86
- UserCredential.user_id.name: FilterConditionsV0(
87
- in_=list(all_user_ids)
88
- )
86
+ UserProfile.user_id.name: FilterConditionsV0(in_=list(all_user_ids))
89
87
  }
90
88
  ),
91
89
  columns=[
92
- UserCredential.user_id.name,
93
- UserCredential.user_credential_username.name,
90
+ UserProfile.user_id.name,
91
+ UserProfile.user_profile_username.name,
94
92
  ],
95
93
  )["data"]["main"]
96
- user_credentials_map = {
97
- x[UserCredential.user_id.name]: x[
98
- UserCredential.user_credential_username.name
99
- ]
100
- for x in user_credentials_response
94
+ user_map = {
95
+ x[UserProfile.user_id.name]: x[UserProfile.user_profile_username.name]
96
+ for x in user_profile_response
101
97
  }
102
98
  response_clone = response
103
99
  response_clone["data"]["main"] = [
104
100
  {
105
101
  **greeting,
106
- UserCredential.user_credential_username.name: user_credentials_map.get(
102
+ UserProfile.user_profile_username.name: user_map.get(
107
103
  greeting[Greeting.user_id.name]
108
104
  ),
109
105
  }
@@ -3,9 +3,11 @@ import os
3
3
  from square_administration.configuration import (
4
4
  config_str_ssl_key_file_path,
5
5
  config_str_ssl_crt_file_path,
6
+ global_object_square_logger,
6
7
  )
7
8
 
8
9
 
10
+ @global_object_square_logger.auto_logger
9
11
  def is_https() -> bool:
10
12
  return os.path.exists(config_str_ssl_key_file_path) and os.path.exists(
11
13
  config_str_ssl_crt_file_path
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: square-administration
3
- Version: 3.0.0
3
+ Version: 3.0.2
4
4
  Summary: common business layer for my personal server.
5
5
  Home-page: https://github.com/thepmsquare/square_administration
6
6
  Author: thePmSquare
@@ -42,6 +42,14 @@ pip install square_administration
42
42
 
43
43
  ## changelog
44
44
 
45
+ ### v3.0.2
46
+
47
+ - update logic to get usernames for non-anonymous greetings in get_all_greetings_v0.
48
+
49
+ ### v3.0.1
50
+
51
+ - add logging decorator to all functions.
52
+
45
53
  ### v3.0.0
46
54
 
47
55
  - add new parameter -> password in authentication -> remove_app_for_self_v0.
@@ -8,10 +8,10 @@ square_administration/pydantic_models/authentication.py,sha256=QEfM5ezG45hc_qATX
8
8
  square_administration/pydantic_models/core.py,sha256=HUMrBmfKrXeL-126gE5j2povdVmktn8XLg2tHEdeXTk,344
9
9
  square_administration/routes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  square_administration/routes/authentication.py,sha256=vOkuAmnPkTl-PSDmSkyui2tvhFxvo0WzMAAuz3st-QY,16053
11
- square_administration/routes/core.py,sha256=65_FIZilintZvbHx7r25UQbgN-oKdQ92-Nv3kpwKX6s,5374
11
+ square_administration/routes/core.py,sha256=lKI1yAZG4LYKk-Z0pgdFwKW3wSl0ArziTylEKvp4DD0,5233
12
12
  square_administration/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- square_administration/utils/common.py,sha256=amCGhwizka1MgM-Xlw_8f07V54Br7pOvCDtevJfz98M,276
14
- square_administration-3.0.0.dist-info/METADATA,sha256=WTaYynDDAj-mCsMt78vfdD0mdEJNKmv7pKmtrcMAG-8,2168
15
- square_administration-3.0.0.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
16
- square_administration-3.0.0.dist-info/top_level.txt,sha256=8WFipDrMQUPRDo5AvipxU1YK3wZtWZyCUMWaR416zAw,22
17
- square_administration-3.0.0.dist-info/RECORD,,
13
+ square_administration/utils/common.py,sha256=Uk2clDugVI8U6-bgjs77fxC4DuqmJEJ_IznBs1jAtWc,350
14
+ square_administration-3.0.2.dist-info/METADATA,sha256=-XTGMZZBJeQknNJvEJwkJFTiQ8JvcBkgJs1-vWM56tY,2321
15
+ square_administration-3.0.2.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
16
+ square_administration-3.0.2.dist-info/top_level.txt,sha256=8WFipDrMQUPRDo5AvipxU1YK3wZtWZyCUMWaR416zAw,22
17
+ square_administration-3.0.2.dist-info/RECORD,,