bugfix: Allow static IDs
This commit is contained in:
parent
b8f23ce80c
commit
6da050e3b9
|
|
@ -251,7 +251,7 @@ service OliveTinApiService {
|
|||
|
||||
rpc DumpPublicIdActionMap(DumpPublicIdActionMapRequest) returns (DumpPublicIdActionMapResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/api/DumpPublicIdActionMap"
|
||||
get: "/api/DumpPublicActionMap"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -118,10 +118,14 @@ func buildChoices(choices []config.ActionArgumentChoice) []*pb.ActionArgumentCho
|
|||
}
|
||||
|
||||
func createPublicID(action *config.Action, entityPrefix string) string {
|
||||
h := sha256.New()
|
||||
h.Write([]byte(action.ID + "." + entityPrefix))
|
||||
if action.Entity == "" {
|
||||
return action.ID
|
||||
} else {
|
||||
h := sha256.New()
|
||||
h.Write([]byte(action.ID + "." + entityPrefix))
|
||||
|
||||
return fmt.Sprintf("%x", h.Sum(nil))
|
||||
return fmt.Sprintf("%x", h.Sum(nil))
|
||||
}
|
||||
}
|
||||
|
||||
func findActionByPublicID(id string) *config.Action {
|
||||
|
|
|
|||
Loading…
Reference in New Issue