💥 Improvements in the URL of the publication site

This commit is contained in:
2025-11-20 21:29:32 +08:00
parent 8e5cdfbc62
commit 6ed96780ab
5 changed files with 82 additions and 35 deletions

View File

@@ -108,4 +108,16 @@ public class RemotePublisherService(PublisherService.PublisherServiceClient publ
};
return await IsPublisherMember(publisherId.ToString(), accountId.ToString(), protoRole, cancellationToken);
}
}
public async Task<SnPublisher?> GetPublisherByName(string name, CancellationToken cancellationToken = default)
{
try
{
return await GetPublisher(name: name, cancellationToken: cancellationToken);
}
catch (Grpc.Core.RpcException ex) when (ex.StatusCode == Grpc.Core.StatusCode.NotFound)
{
return null;
}
}
}