mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2026-04-25 08:45:58 +03:00
[GH-ISSUE #671] 接口单复数导致404 #1685
Labels
No labels
Q/A
bug
casdoor
dependencies
docker
documentation
duplicate
enhancement
help wanted
invalid
lego
platform:openwrt
platform:windows
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-ui#1685
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @fjk0618 on GitHub (Oct 28, 2024).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/671
Describe the bug
后段api接口,在定义列表接口时,是复数风格,例如/certs、/dns_credentials,但是在新增、删除、编辑时是单数风格,例如/cert/:id,/dns_credential/:id,因为前端公用了同一个baseUrl,导致除了列表接口外, 其他接口都会404。
因为获取列表时,调用的是get请求的/api/dns_credentials,此时baseUrl=/api/dns_credentials,此时去调用新增接口,只会变成post的
/api/dns_credentials,而后端实际接口是/api/dns_credential。希望大佬能够统一修复下。目前发现
certificate/route.go中的路由存在这个问题
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Info (please complete the following information):
Additional context
Add any other context about the problem here.
@0xJacky commented on GitHub (Oct 28, 2024):
已经修复,稍后发新版