🚚 Update url mapping

This commit is contained in:
LittleSheep 2024-05-18 20:54:44 +08:00
parent 7152380740
commit 4607e18fb3
2 changed files with 5 additions and 7 deletions

10
.idea/workspace.xml generated
View File

@ -4,12 +4,9 @@
<option name="autoReloadType" value="ALL" /> <option name="autoReloadType" value="ALL" />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="18dd0d68-b4b8-40db-9734-9119b5c848bd" name="更改" comment=":sparkles: Upload attachment requires permission check"> <list default="true" id="18dd0d68-b4b8-40db-9734-9119b5c848bd" name="更改" comment=":sparkles: Provide a faster check attachment exists grpc method">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pkg/grpc/attachments.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/grpc/attachments.go" afterDir="false" /> <change beforePath="$PROJECT_DIR$/pkg/server/startup.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/server/startup.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pkg/grpc/proto/attachments.pb.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/grpc/proto/attachments.pb.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pkg/grpc/proto/attachments.proto" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/grpc/proto/attachments.proto" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pkg/grpc/proto/attachments_grpc.pb.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/grpc/proto/attachments_grpc.pb.go" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -72,7 +69,8 @@
</component> </component>
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">
<MESSAGE value=":sparkles: Upload attachment requires permission check" /> <MESSAGE value=":sparkles: Upload attachment requires permission check" />
<option name="LAST_COMMIT_MESSAGE" value=":sparkles: Upload attachment requires permission check" /> <MESSAGE value=":sparkles: Provide a faster check attachment exists grpc method" />
<option name="LAST_COMMIT_MESSAGE" value=":sparkles: Provide a faster check attachment exists grpc method" />
</component> </component>
<component name="VgoProject"> <component name="VgoProject">
<settings-migrated>true</settings-migrated> <settings-migrated>true</settings-migrated>

View File

@ -54,7 +54,7 @@ func NewServer() {
api := A.Group("/api").Name("API") api := A.Group("/api").Name("API")
{ {
api.Get("/attachments/i/:id", getAttachmentMeta) api.Get("/attachments/:id/meta", getAttachmentMeta)
api.Get("/attachments/:id", openAttachment) api.Get("/attachments/:id", openAttachment)
api.Post("/attachments", authMiddleware, createAttachment) api.Post("/attachments", authMiddleware, createAttachment)
api.Delete("/attachments/:id", authMiddleware, deleteAttachment) api.Delete("/attachments/:id", authMiddleware, deleteAttachment)