Skip to content

Commit

Permalink
wip: renaming the api function
Browse files Browse the repository at this point in the history
Signed-off-by: dwertent <[email protected]>
  • Loading branch information
dwertent committed Aug 15, 2024
1 parent ab093be commit 0ebc1d8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions internal/apiserver/route_get_identity_by_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ import (
"github.com/hyperledger/firefly/pkg/core"
)

var getIdentityByID = &ffapi.Route{
Name: "getIdentityByID",
Path: "identities/{id:.+}",
var getIdentityByIDOrDID = &ffapi.Route{
Name: "getIdentityByIDOrDID",
Path: "identities/{id:.+}", // Allow any character in the ID (including slashes), othrwise the DID will be split into multiple path segments
Method: http.MethodGet,
PathParams: []*ffapi.PathParam{
{Name: "id", Example: "id", Description: coremsgs.APIParamsIdentityIDs},
},
QueryParams: []*ffapi.QueryParam{
{Name: "fetchverifiers", Example: "true", Description: coremsgs.APIParamsFetchVerifiers, IsBool: true},
},
Description: coremsgs.APIEndpointsGetIdentityByID,
Description: coremsgs.APIEndpointsGetIdentityByIDOrDID,
JSONInputValue: nil,
JSONOutputValue: func() interface{} { return &core.Identity{} },
JSONOutputCodes: []int{http.StatusOK},
Expand Down
2 changes: 1 addition & 1 deletion internal/apiserver/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ var routes = append(
getGroupByHash,
getGroups,
getIdentities,
getIdentityByID,
getIdentityByIDOrDID,
getIdentityDID,
getIdentityVerifiers,
getMsgByID,
Expand Down
2 changes: 1 addition & 1 deletion internal/coremsgs/en_api_translations.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ var (
APIEndpointsGetGroupByHash = ffm("api.endpoints.getGroupByHash", "Gets a group by its ID (hash)")
APIEndpointsGetGroups = ffm("api.endpoints.getGroups", "Gets a list of groups")
APIEndpointsGetIdentities = ffm("api.endpoints.getIdentities", "Gets a list of all identities that have been registered in the namespace")
APIEndpointsGetIdentityByID = ffm("api.endpoints.getIdentityByID", "Gets an identity by its ID (UUID/DID)")
APIEndpointsGetIdentityByIDOrDID = ffm("api.endpoints.getIdentityByIDOrDID", "Gets an identity by its ID or DID")
APIEndpointsGetIdentityDID = ffm("api.endpoints.getIdentityDID", "Gets the DID for an identity based on its ID")
APIEndpointsGetIdentityVerifiers = ffm("api.endpoints.getIdentityVerifiers", "Gets the verifiers for an identity")
APIEndpointsGetMsgByID = ffm("api.endpoints.getMsgByID", "Gets a message by its ID")
Expand Down

0 comments on commit 0ebc1d8

Please sign in to comment.