feat(contact): 添加联系信息提交功能
Build docker and publish / build (20.15.1) (push) Successful in 5m55s

实现联系信息提交功能,包括:
1. 新增ContactRequest类型定义
2. 添加POST /contact路由
3. 实现联系信息提交处理逻辑
4. 通过Telegram发送联系信息通知
5. 在Telegram配置中添加GroupChatID字段
This commit is contained in:
2025-12-21 19:32:23 -08:00
parent 2fdc9c8127
commit 74f4a12422
8 changed files with 207 additions and 12 deletions
+10 -1
View File
@@ -87,6 +87,12 @@ type (
Total int64 `json:"total"`
List []SubscribeClient `json:"list"`
}
ContactRequest {
Name string `json:"name" validate:"required"`
Email string `json:"email" validate:"required,email"`
OtherContact string `json:"other_contact,optional"`
Notes string `json:"notes,optional"`
}
)
@server (
@@ -99,6 +105,10 @@ service ppanel {
@handler GetGlobalConfig
get /site/config returns (GetGlobalConfigResponse)
@doc "Submit contact info"
@handler SubmitContact
post /contact (ContactRequest)
@doc "Get Tos Content"
@handler GetTos
get /site/tos returns (GetTosResponse)
@@ -131,4 +141,3 @@ service ppanel {
@handler GetClient
get /client returns (GetSubscribeClientResponse)
}