Skip to content

Conversation

@lianjin
Copy link
Contributor

@lianjin lianjin commented Sep 28, 2025


name: Pull Request | 合并请求
about: 修复或改进 | Submit a fix, or improvement
labels: ["fix"]

变更内容 | Changes

add a :client path parameter to each api, to differentiate requests from customer/merchant

相关 Issue | Related Issue

[KAN-40 Use Service API distinguish between merchant-frontend and customer-frontend] (https://cerami-craft.atlassian.net/browse/KAN-40)

变更类型 | Type of Change

  • 新功能 Feature
  • 修复 Bug Fix
  • 文档 Documentation
  • 样式优化 Style
  • 重构 Refactor
  • 性能优化 Performance
  • 测试 Test
  • 构建/CI Build/CI
  • 其他 Other

检查清单 | Checklist

  • 代码已通过本地测试(含主流浏览器/终端)| Code tested locally (including major browsers/terminals)
  • 相关文档已更新(如有)| Documentation updated if needed
  • 代码风格符合项目规范 | Code style follows project conventions
  • 变更不会影响现有功能 | Changes do not break existing features
  • 已自查无敏感信息泄露 | No sensitive info is leaked

变更影响 | Impact

frontend need to adjust new api

测试说明 | Test Instructions

test login/logout (merchant/customer)
test registration/activatation (customer)

其他说明 | Additional Notes

@lianjin lianjin requested review from Copilot and yzcgg September 28, 2025 02:30
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a :client path parameter to user management API endpoints to differentiate between customer and merchant client requests, implementing the requirement from KAN-40.

  • Introduces client validation middleware to ensure only "customer" or "merchant" values are accepted
  • Updates all authentication and user management endpoints to include the client path parameter
  • Updates Swagger documentation to reflect the new API structure

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
server/http/router/router.go Adds client path parameter to route groups and implements validation middleware
server/http/api/register.go Updates registration and activation endpoint documentation with client parameter
server/http/api/login.go Updates login and logout endpoint documentation with client parameter
server/docs/swagger.yaml Updates OpenAPI specification with client path parameters
server/docs/swagger.json Updates generated JSON documentation with client path parameters
server/docs/docs.go Updates generated Go documentation with client path parameters

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@lianjin lianjin force-pushed the KAN-40-FIX-API-Split branch from 4065938 to ee189fe Compare September 28, 2025 02:34
Copilot AI review requested due to automatic review settings September 28, 2025 02:38
@lianjin lianjin force-pushed the KAN-40-FIX-API-Split branch from ee189fe to 527a5b8 Compare September 28, 2025 02:38
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@lianjin lianjin force-pushed the KAN-40-FIX-API-Split branch from 527a5b8 to 2d66b9c Compare September 28, 2025 02:46
Copilot AI review requested due to automatic review settings September 28, 2025 02:50
@lianjin lianjin force-pushed the KAN-40-FIX-API-Split branch from 2d66b9c to 1d5424b Compare September 28, 2025 02:50
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@lianjin lianjin force-pushed the KAN-40-FIX-API-Split branch from 1d5424b to ed62ec7 Compare September 28, 2025 02:53
@yzcgg yzcgg merged commit 45b5084 into main Sep 28, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants