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

@@ -33,10 +33,11 @@ type PreCheckResp struct {
}
// PreUploadCheck
// @Router /admin/uploads/pre-uploaded-check/:md5.:ext [get]
// @Bind md5 path
// @Bind ext path
// @Bind mime query
//
// @Router /admin/uploads/pre-uploaded-check/:md5.:ext [get]
// @Bind md5 path
// @Bind ext path
// @Bind mime query
func (up *uploads) PreUploadCheck(ctx fiber.Ctx, md5, ext, mime string) (*PreCheckResp, error) {
_, err := models.Medias.GetByHash(ctx.Context(), md5)
if err != nil && errors.Is(err, qrm.ErrNoRows) {
@@ -59,8 +60,9 @@ type PostUploadedForm struct {
}
// PostUploadedAction
// @Router /admin/uploads/post-uploaded-action [post]
// @Bind body body
//
// @Router /admin/uploads/post-uploaded-action [post]
// @Bind body body
func (up *uploads) PostUploadedAction(ctx fiber.Ctx, body *PostUploadedForm) error {
m, err := models.Medias.GetByHash(ctx.Context(), body.Md5)
if err != nil && !errors.Is(err, qrm.ErrNoRows) {