added ability to set media class of items
Build and Push Image / build-and-push (push) Successful in 5m4s
Build and Push Image / build-and-push (push) Successful in 5m4s
This commit is contained in:
@@ -41,10 +41,7 @@ message Id {
|
||||
}
|
||||
|
||||
message MediaResponse {
|
||||
oneof result {
|
||||
MediaModel value = 1;
|
||||
google.protobuf.Empty empty = 2;
|
||||
}
|
||||
optional MediaModel value = 1;
|
||||
}
|
||||
|
||||
message ListResponse {
|
||||
|
||||
@@ -17,7 +17,7 @@ public class AobaRpcService(AobaService aobaService, AccountsService accountsSer
|
||||
{
|
||||
public override async Task<MediaResponse> GetMedia(Id request, ServerCallContext context)
|
||||
{
|
||||
var media = await aobaService.GetMediaFromLegacyIdAsync(request.ToObjectId(), context.CancellationToken);
|
||||
var media = await aobaService.GetMediaAsync(request.ToObjectId(), context.CancellationToken);
|
||||
return media.ToResponse();
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ public static class ProtoExtensions
|
||||
public static MediaResponse ToResponse(this Media? media)
|
||||
{
|
||||
if(media == null)
|
||||
return new MediaResponse() { Empty = new Empty() };
|
||||
return new MediaResponse() {};
|
||||
return new MediaResponse()
|
||||
{
|
||||
Value = media.ToMediaModel()
|
||||
|
||||
Reference in New Issue
Block a user