fixes for capabilities
This commit is contained in:
@@ -183,13 +183,9 @@ public class ApiServer : IApiServer
|
||||
semaphore.Release();
|
||||
}
|
||||
|
||||
public virtual IEnumerable<string> GetEndpoints()
|
||||
public virtual Dictionary<string, string[]> GetEndpoints()
|
||||
{
|
||||
return handlers.SelectMany(n => n.Attribute.Methods.Select(m => new
|
||||
{
|
||||
n.Attribute.Route,
|
||||
Method = m,
|
||||
})).OrderBy(n => n.Route).ThenBy(n => n.Method).Select(n => $"{n.Method} {n.Route}");
|
||||
return handlers.GroupBy(n => n.Attribute.Route).ToDictionary(n => n.Key, n => n.SelectMany(n => n.Attribute.Methods).ToArray());
|
||||
}
|
||||
|
||||
public virtual void RegisterHandler<T>(T instance) where T : class
|
||||
|
||||
Reference in New Issue
Block a user