mirror of
https://github.com/pikami/cosmium.git
synced 2025-12-20 09:20:11 +00:00
Generate legit ResourceIds for SDK compatibility
This commit is contained in:
@@ -13,7 +13,13 @@ func GetAllCollections(c *gin.Context) {
|
||||
|
||||
collections, status := repositories.GetAllCollections(databaseId)
|
||||
if status == repositorymodels.StatusOk {
|
||||
c.IndentedJSON(http.StatusOK, gin.H{"_rid": "", "DocumentCollections": collections, "_count": len(collections)})
|
||||
database, _ := repositories.GetDatabase(databaseId)
|
||||
|
||||
c.IndentedJSON(http.StatusOK, gin.H{
|
||||
"_rid": database.ResourceID,
|
||||
"DocumentCollections": collections,
|
||||
"_count": len(collections),
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user