mirror of
https://github.com/pikami/cosmium.git
synced 2025-12-20 01:10:44 +00:00
Update dependencies; Fix authentication for UDF, SPROC and TRIGGER endpoints
This commit is contained in:
@@ -60,6 +60,9 @@ func requestToResourceId(c *gin.Context) string {
|
||||
databaseId, _ := c.Params.Get("databaseId")
|
||||
collId, _ := c.Params.Get("collId")
|
||||
docId, _ := c.Params.Get("docId")
|
||||
triggerId, _ := c.Params.Get("triggerId")
|
||||
sprocId, _ := c.Params.Get("sprocId")
|
||||
udfId, _ := c.Params.Get("udfId")
|
||||
resourceType := urlToResourceType(c.Request.URL.String())
|
||||
|
||||
var resourceId string
|
||||
@@ -72,6 +75,15 @@ func requestToResourceId(c *gin.Context) string {
|
||||
if docId != "" {
|
||||
resourceId += "/docs/" + docId
|
||||
}
|
||||
if triggerId != "" {
|
||||
resourceId += "/triggers/" + triggerId
|
||||
}
|
||||
if sprocId != "" {
|
||||
resourceId += "/sprocs/" + sprocId
|
||||
}
|
||||
if udfId != "" {
|
||||
resourceId += "/udfs/" + udfId
|
||||
}
|
||||
|
||||
isFeed := c.Request.Header.Get("A-Im") == "Incremental Feed"
|
||||
if resourceType == "pkranges" && isFeed {
|
||||
|
||||
Reference in New Issue
Block a user