Attempt to fix errors
Attempt to fix errors, introduced new errors.
This commit is contained in:
parent
8187a03419
commit
2e4f644c17
3 changed files with 3 additions and 10 deletions
|
|
@ -11,7 +11,7 @@ public static class PingEndpoint
|
|||
group.MapGet("/", async (CancellationToken token) =>
|
||||
{
|
||||
await Task.Delay(10);
|
||||
var dict = new { AppVersion = "0.1.3" };
|
||||
var dict = new { AppVersion = "0.1.4" };
|
||||
return Results.Ok(dict);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -32,8 +32,6 @@ public static class PlaylistEndpoint
|
|||
{
|
||||
var vid = new Video();
|
||||
vid.MapFrom(video);
|
||||
await vidRepo.AddAsync(vid, ct, false);
|
||||
|
||||
results.videos.Add(vid);
|
||||
}
|
||||
await repository.AddAsync(results, ct);
|
||||
|
|
@ -51,7 +49,6 @@ public static class PlaylistEndpoint
|
|||
else
|
||||
{
|
||||
video.MapFrom(f);
|
||||
await vidRepo.UpdateAsync(video, ct, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -64,7 +61,6 @@ public static class PlaylistEndpoint
|
|||
{
|
||||
var vres = new Video();
|
||||
vres.MapFrom(newVid);
|
||||
await vidRepo.AddAsync(vres, ct, false);
|
||||
results.videos.Add(vres);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,12 +27,12 @@ public static class ProfileEndpoint
|
|||
{
|
||||
res = new Profile();
|
||||
res.MapFrom(profileJson);
|
||||
await repository.AddAsync(res, ct);
|
||||
|
||||
foreach (var subscription in profileJson.subscriptions)
|
||||
{
|
||||
var sub = new Subscription();
|
||||
sub.MapFrom(subscription);
|
||||
await subRepo.AddAsync(sub, ct, false);
|
||||
|
||||
res.subscriptions.Add(sub);
|
||||
}
|
||||
await repository.AddAsync(res, ct);
|
||||
|
|
@ -49,7 +49,6 @@ public static class ProfileEndpoint
|
|||
else
|
||||
{
|
||||
subscription.MapFrom(f);
|
||||
await subRepo.UpdateAsync(subscription, ct, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -62,8 +61,6 @@ public static class ProfileEndpoint
|
|||
{
|
||||
var sres = new Subscription();
|
||||
sres.MapFrom(newSub);
|
||||
await subRepo.AddAsync(sres, ct, false);
|
||||
|
||||
res.subscriptions.Add(sres);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue