wip
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
namespace Socialize.Modules.Assets.Data;
|
||||
namespace Socialize.Api.Modules.Assets.Data;
|
||||
|
||||
public class Asset
|
||||
{
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace Socialize.Modules.Assets.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Socialize.Api.Modules.Assets.Data;
|
||||
|
||||
public static class AssetModelConfiguration
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Socialize.Modules.Assets.Data;
|
||||
namespace Socialize.Api.Modules.Assets.Data;
|
||||
|
||||
public class AssetRevision
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Socialize.Modules.Assets.Data;
|
||||
using Socialize.Api.Modules.Assets.Data;
|
||||
|
||||
namespace Socialize.Modules.Assets;
|
||||
namespace Socialize.Api.Modules.Assets;
|
||||
|
||||
public static class DependencyInjection
|
||||
{
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
using Socialize.Infrastructure.Security;
|
||||
using Socialize.Modules.Notifications.Contracts;
|
||||
using FastEndpoints;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Socialize.Api.Data;
|
||||
using Socialize.Api.Infrastructure.Security;
|
||||
using Socialize.Api.Modules.Assets.Data;
|
||||
using Socialize.Api.Modules.ContentItems.Data;
|
||||
using Socialize.Api.Modules.Notifications.Contracts;
|
||||
|
||||
namespace Socialize.Modules.Assets.Handlers;
|
||||
namespace Socialize.Api.Modules.Assets.Handlers;
|
||||
|
||||
public record CreateAssetRevisionRequest(
|
||||
string SourceReference,
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
using Socialize.Infrastructure.Security;
|
||||
using Socialize.Modules.Notifications.Contracts;
|
||||
using FastEndpoints;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Socialize.Api.Data;
|
||||
using Socialize.Api.Infrastructure.Security;
|
||||
using Socialize.Api.Modules.Assets.Data;
|
||||
using Socialize.Api.Modules.ContentItems.Data;
|
||||
using Socialize.Api.Modules.Notifications.Contracts;
|
||||
|
||||
namespace Socialize.Modules.Assets.Handlers;
|
||||
namespace Socialize.Api.Modules.Assets.Handlers;
|
||||
|
||||
public record CreateGoogleDriveAssetRequest(
|
||||
Guid WorkspaceId,
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
using Socialize.Infrastructure.Security;
|
||||
namespace Socialize.Modules.Assets.Handlers;
|
||||
using FastEndpoints;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Socialize.Api.Data;
|
||||
using Socialize.Api.Infrastructure.Security;
|
||||
|
||||
namespace Socialize.Api.Modules.Assets.Handlers;
|
||||
|
||||
public record GetAssetsRequest(Guid ContentItemId);
|
||||
|
||||
@@ -40,7 +44,7 @@ public class GetAssetsHandler(
|
||||
|
||||
public override async Task HandleAsync(GetAssetsRequest request, CancellationToken ct)
|
||||
{
|
||||
ContentItem? item = await dbContext.ContentItems
|
||||
var item = await dbContext.ContentItems
|
||||
.SingleOrDefaultAsync(candidate => candidate.Id == request.ContentItemId, ct);
|
||||
if (item is null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user