feat: add wxshare

This commit is contained in:
Rogee
2025-04-30 17:06:10 +08:00
parent af0507d0c1
commit 42c1c17c0a
24 changed files with 313 additions and 147 deletions

View File

@@ -19,8 +19,8 @@ type UserInfo struct {
Username string `json:"username,omitempty"`
}
// @Router /users/profile [get]
// @Bind user local
// @Router /users/profile [get]
// @Bind user local
func (ctl *users) Profile(ctx fiber.Ctx, user *model.Users) (*UserInfo, error) {
return &UserInfo{
ID: user.ID,
@@ -34,9 +34,10 @@ type ProfileForm struct {
}
// Update
// @Router /users/username [put]
// @Bind user local
// @Bind form body
//
// @Router /users/username [put]
// @Bind user local
// @Bind form body
func (ctl *users) Update(ctx fiber.Ctx, user *model.Users, form *ProfileForm) error {
username := strings.TrimSpace(form.Username)
if len([]rune(username)) > 12 {