Skip to content

Commit

Permalink
fix(open v2 api): some without slash
Browse files Browse the repository at this point in the history
  • Loading branch information
nannan00 committed Aug 6, 2024
1 parent b408cdd commit b26f71a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/bk-user/bkuser/apis/open_v2/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
"""

from django.urls import path

from . import views
Expand All @@ -31,6 +32,12 @@
views.ProfileDepartmentListApi.as_view(),
name="open_v2.list_profile_departments",
),
# 与上面 API 一样,只是兼容了缺少末尾 / 的情况 (ESB yaml 配置里是该情况)
path(
"profiles/<str:lookup_value>/departments",
views.ProfileDepartmentListApi.as_view(),
name="open_v2.list_profile_departments.without_slash",
),
# 查询部门用户关系表
path(
"edges/department_profile/",
Expand All @@ -53,6 +60,12 @@
views.DepartmentProfileListApi.as_view(),
name="open_v2.list_department_profiles",
),
# 与上面 API 一样,只是兼容了缺少末尾 / 的情况 (ESB yaml 配置里是该情况)
path(
"departments/<str:id>/profiles",
views.DepartmentProfileListApi.as_view(),
name="open_v2.list_department_profiles.without_slash",
),
# 更新用户语言
path(
"profiles/<str:username>/languages/",
Expand Down

0 comments on commit b26f71a

Please sign in to comment.