add user routes
This commit is contained in:
@@ -23,7 +23,7 @@ func fullName(message string) protoreflect.FullName {
|
||||
return protoreflect.FullName(fmt.Sprintf("%sdori.proto.ce.%s", server, message))
|
||||
}
|
||||
|
||||
func Decode(message string, data []byte) (proto.Message, error) {
|
||||
func Decode(message string, data []byte) (map[string]any, error) {
|
||||
mt, err := protoregistry.GlobalTypes.FindMessageByName(fullName(message))
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("message %s not found", message)
|
||||
@@ -34,7 +34,7 @@ func Decode(message string, data []byte) (proto.Message, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return msg, nil
|
||||
return ToMap(msg)
|
||||
}
|
||||
|
||||
func Encode(message string, data map[string]any) ([]byte, error) {
|
||||
|
||||
Reference in New Issue
Block a user