wip
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
namespace Socialize.Common.Domain;
|
namespace Socialize.Api.Common.Domain;
|
||||||
|
|
||||||
public abstract class Entity
|
public abstract class Entity
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
||||||
using Socialize.Modules.Approvals.Data;
|
using Socialize.Api.Modules.Approvals.Data;
|
||||||
using Socialize.Modules.Assets.Data;
|
using Socialize.Api.Modules.Assets.Data;
|
||||||
using Socialize.Modules.Clients.Data;
|
using Socialize.Api.Modules.Clients.Data;
|
||||||
using Socialize.Modules.Comments.Data;
|
using Socialize.Api.Modules.Comments.Data;
|
||||||
using Socialize.Modules.ContentItems.Data;
|
using Socialize.Api.Modules.ContentItems.Data;
|
||||||
using Socialize.Modules.Identity.Data;
|
using Socialize.Api.Modules.Identity.Data;
|
||||||
using Socialize.Modules.Notifications.Data;
|
using Socialize.Api.Modules.Notifications.Data;
|
||||||
using Socialize.Modules.Projects.Data;
|
using Socialize.Api.Modules.Projects.Data;
|
||||||
using Socialize.Modules.Workspaces.Data;
|
using Socialize.Api.Modules.Workspaces.Data;
|
||||||
|
|
||||||
namespace Socialize.Data;
|
namespace Socialize.Api.Data;
|
||||||
|
|
||||||
public class AppDbContext(
|
public class AppDbContext(
|
||||||
DbContextOptions<AppDbContext> options)
|
DbContextOptions<AppDbContext> options)
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using Socialize.Data;
|
using Socialize.Api.Data;
|
||||||
using Socialize.Infrastructure.Security;
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.AspNetCore.Authentication;
|
using Microsoft.AspNetCore.Authentication;
|
||||||
using Microsoft.AspNetCore.Authentication.Facebook;
|
using Microsoft.AspNetCore.Authentication.Facebook;
|
||||||
using Microsoft.AspNetCore.Authentication.Google;
|
using Microsoft.AspNetCore.Authentication.Google;
|
||||||
|
|||||||
@@ -1,14 +1,2 @@
|
|||||||
global using FluentValidation;
|
global using FluentValidation;
|
||||||
global using FastEndpoints;
|
|
||||||
global using JetBrains.Annotations;
|
global using JetBrains.Annotations;
|
||||||
global using Microsoft.EntityFrameworkCore;
|
|
||||||
global using Socialize.Data;
|
|
||||||
global using Socialize.Modules.Approvals.Data;
|
|
||||||
global using Socialize.Modules.Assets.Data;
|
|
||||||
global using Socialize.Modules.Clients.Data;
|
|
||||||
global using Socialize.Modules.Comments.Data;
|
|
||||||
global using Socialize.Modules.ContentItems.Data;
|
|
||||||
global using Socialize.Modules.Identity.Data;
|
|
||||||
global using Socialize.Modules.Notifications.Data;
|
|
||||||
global using Socialize.Modules.Projects.Data;
|
|
||||||
global using Socialize.Modules.Workspaces.Data;
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Socialize.Infrastructure.BlobStorage.Contracts;
|
namespace Socialize.Api.Infrastructure.BlobStorage.Contracts;
|
||||||
|
|
||||||
public static class CommonFileNames
|
public static class CommonFileNames
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Socialize.Infrastructure.BlobStorage.Contracts;
|
namespace Socialize.Api.Infrastructure.BlobStorage.Contracts;
|
||||||
|
|
||||||
internal static class ContainerNames
|
internal static class ContainerNames
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace Socialize.Infrastructure.BlobStorage.Contracts;
|
namespace Socialize.Api.Infrastructure.BlobStorage.Contracts;
|
||||||
|
|
||||||
public static class ContentTypes
|
public static class ContentTypes
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Socialize.Infrastructure.BlobStorage.Contracts;
|
namespace Socialize.Api.Infrastructure.BlobStorage.Contracts;
|
||||||
|
|
||||||
public interface IBlobStorage
|
public interface IBlobStorage
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Socialize.Infrastructure.BlobStorage.Contracts;
|
namespace Socialize.Api.Infrastructure.BlobStorage.Contracts;
|
||||||
|
|
||||||
public static class SubDirectoryNames
|
public static class SubDirectoryNames
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using Azure;
|
using Azure;
|
||||||
using Azure.Storage.Blobs;
|
using Azure.Storage.Blobs;
|
||||||
using Azure.Storage.Blobs.Models;
|
using Azure.Storage.Blobs.Models;
|
||||||
using Socialize.Infrastructure.BlobStorage.Contracts;
|
using Socialize.Api.Infrastructure.BlobStorage.Contracts;
|
||||||
|
|
||||||
namespace Socialize.Infrastructure.BlobStorage.Services;
|
namespace Socialize.Api.Infrastructure.BlobStorage.Services;
|
||||||
|
|
||||||
public class AzureBlobStorage : IBlobStorage
|
public class AzureBlobStorage : IBlobStorage
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Socialize.Infrastructure.Configuration;
|
namespace Socialize.Api.Infrastructure.Configuration;
|
||||||
|
|
||||||
public class WebsiteOptions
|
public class WebsiteOptions
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
using Socialize.Infrastructure.BlobStorage.Contracts;
|
using Socialize.Api.Infrastructure.BlobStorage.Contracts;
|
||||||
using Socialize.Infrastructure.BlobStorage.Services;
|
using Socialize.Api.Infrastructure.BlobStorage.Services;
|
||||||
using Socialize.Infrastructure.Configuration;
|
using Socialize.Api.Infrastructure.Configuration;
|
||||||
using Socialize.Infrastructure.Emailer.Configuration;
|
using Socialize.Api.Infrastructure.Emailer.Configuration;
|
||||||
using Socialize.Infrastructure.Emailer.Contracts;
|
using Socialize.Api.Infrastructure.Emailer.Contracts;
|
||||||
using Socialize.Infrastructure.Emailer.Services;
|
using Socialize.Api.Infrastructure.Emailer.Services;
|
||||||
using Socialize.Infrastructure.Payments.Stripe.Configuration;
|
using Socialize.Api.Infrastructure.Payments.Stripe.Configuration;
|
||||||
|
|
||||||
namespace Socialize.Infrastructure;
|
namespace Socialize.Api.Infrastructure;
|
||||||
|
|
||||||
public static class DependencyInjection
|
public static class DependencyInjection
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,11 +1,21 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
using Socialize.Infrastructure.Security;
|
using Socialize.Api.Data;
|
||||||
using Socialize.Modules.Identity.Contracts;
|
using Socialize.Api.Infrastructure.Security;
|
||||||
using Socialize.Modules.Identity.Data;
|
using Socialize.Api.Modules.Identity.Contracts;
|
||||||
|
using Socialize.Api.Modules.Identity.Data;
|
||||||
|
using Socialize.Api.Modules.Assets.Data;
|
||||||
|
using Socialize.Api.Modules.Approvals.Data;
|
||||||
|
using Socialize.Api.Modules.Comments.Data;
|
||||||
|
using Socialize.Api.Modules.ContentItems.Data;
|
||||||
|
using Socialize.Api.Modules.Clients.Data;
|
||||||
|
using Socialize.Api.Modules.Notifications.Data;
|
||||||
|
using Socialize.Api.Modules.Projects.Data;
|
||||||
|
using Socialize.Api.Modules.Workspaces.Data;
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
|
|
||||||
namespace Socialize.Infrastructure.Development;
|
namespace Socialize.Api.Infrastructure.Development;
|
||||||
|
|
||||||
public static class DevelopmentSeedExtensions
|
public static class DevelopmentSeedExtensions
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Socialize.Infrastructure.Development;
|
namespace Socialize.Api.Infrastructure.Development;
|
||||||
|
|
||||||
public record DevelopmentSeedOptions
|
public record DevelopmentSeedOptions
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Socialize.Infrastructure.Emailer.Configuration;
|
namespace Socialize.Api.Infrastructure.Emailer.Configuration;
|
||||||
|
|
||||||
public class EmailerOptions
|
public class EmailerOptions
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Socialize.Infrastructure.Emailer.Contracts;
|
namespace Socialize.Api.Infrastructure.Emailer.Contracts;
|
||||||
|
|
||||||
public interface IEmailSender
|
public interface IEmailSender
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using Socialize.Infrastructure.Emailer.Contracts;
|
using Socialize.Api.Infrastructure.Emailer.Contracts;
|
||||||
|
|
||||||
namespace Socialize.Infrastructure.Emailer.Services;
|
namespace Socialize.Api.Infrastructure.Emailer.Services;
|
||||||
|
|
||||||
public class LoggerEmailSender(ILogger<IEmailSender> logger)
|
public class LoggerEmailSender(ILogger<IEmailSender> logger)
|
||||||
: IEmailSender
|
: IEmailSender
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using Socialize.Infrastructure.Emailer.Configuration;
|
using Socialize.Api.Infrastructure.Emailer.Configuration;
|
||||||
using Socialize.Infrastructure.Emailer.Contracts;
|
using Socialize.Api.Infrastructure.Emailer.Contracts;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using PostmarkDotNet;
|
using PostmarkDotNet;
|
||||||
|
|
||||||
namespace Socialize.Infrastructure.Emailer.Services;
|
namespace Socialize.Api.Infrastructure.Emailer.Services;
|
||||||
|
|
||||||
public class PostmarkEmailSender : IEmailSender
|
public class PostmarkEmailSender : IEmailSender
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
using System.Net.Http.Headers;
|
using System.Net.Http.Headers;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using Socialize.Infrastructure.Emailer.Configuration;
|
using Socialize.Api.Infrastructure.Emailer.Configuration;
|
||||||
using Socialize.Infrastructure.Emailer.Contracts;
|
using Socialize.Api.Infrastructure.Emailer.Contracts;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
|
|
||||||
namespace Socialize.Infrastructure.Emailer.Services;
|
namespace Socialize.Api.Infrastructure.Emailer.Services;
|
||||||
|
|
||||||
public class ResendEmailSender : IEmailSender
|
public class ResendEmailSender : IEmailSender
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Socialize.Infrastructure.Payments.Stripe.Configuration;
|
namespace Socialize.Api.Infrastructure.Payments.Stripe.Configuration;
|
||||||
|
|
||||||
public class StripeOptions
|
public class StripeOptions
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
using Socialize.Modules.Identity.Contracts;
|
using Socialize.Api.Modules.Identity.Contracts;
|
||||||
|
|
||||||
namespace Socialize.Infrastructure.Security;
|
namespace Socialize.Api.Infrastructure.Security;
|
||||||
|
|
||||||
public sealed class AccessScopeService
|
public sealed class AccessScopeService
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
|
|
||||||
namespace Socialize.Infrastructure.Security;
|
namespace Socialize.Api.Infrastructure.Security;
|
||||||
|
|
||||||
public static class ClaimsPrincipalExtensions
|
public static class ClaimsPrincipalExtensions
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ using System.Security.Claims;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using Microsoft.IdentityModel.Tokens;
|
using Microsoft.IdentityModel.Tokens;
|
||||||
|
|
||||||
namespace Socialize.Infrastructure.Security;
|
namespace Socialize.Api.Infrastructure.Security;
|
||||||
|
|
||||||
public static class JwtTokenHelper
|
public static class JwtTokenHelper
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Socialize.Infrastructure.Security;
|
namespace Socialize.Api.Infrastructure.Security;
|
||||||
|
|
||||||
public static class KnownClaims
|
public static class KnownClaims
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Socialize.Infrastructure.Security;
|
namespace Socialize.Api.Infrastructure.Security;
|
||||||
|
|
||||||
public class MissingClaimException(
|
public class MissingClaimException(
|
||||||
string claimName)
|
string claimName)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace Socialize.Infrastructure.Security;
|
namespace Socialize.Api.Infrastructure.Security;
|
||||||
|
|
||||||
// If we need to add special characters we can alternate between 2 pools.
|
// If we need to add special characters we can alternate between 2 pools.
|
||||||
public static class PasswordGenerator
|
public static class PasswordGenerator
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
|
|
||||||
namespace Socialize.Infrastructure.Security;
|
namespace Socialize.Api.Infrastructure.Security;
|
||||||
|
|
||||||
public static class RefreshTokenGenerator
|
public static class RefreshTokenGenerator
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace Socialize.Infrastructure.YouTube;
|
namespace Socialize.Api.Infrastructure.YouTube;
|
||||||
|
|
||||||
public static class YouTubeUrlHelper
|
public static class YouTubeUrlHelper
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
using Socialize.Data;
|
using Socialize.Api.Data;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore;
|
|||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
using Socialize.Data;
|
using Socialize.Api.Data;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Socialize.Modules.Approvals.Data;
|
namespace Socialize.Api.Modules.Approvals.Data;
|
||||||
|
|
||||||
public class ApprovalDecision
|
public class ApprovalDecision
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
namespace Socialize.Modules.Approvals.Data;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
|
namespace Socialize.Api.Modules.Approvals.Data;
|
||||||
|
|
||||||
public static class ApprovalModelConfiguration
|
public static class ApprovalModelConfiguration
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Socialize.Modules.Approvals.Data;
|
namespace Socialize.Api.Modules.Approvals.Data;
|
||||||
|
|
||||||
public class ApprovalRequest
|
public class ApprovalRequest
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using Socialize.Modules.Approvals.Data;
|
using Socialize.Api.Modules.Approvals.Data;
|
||||||
|
|
||||||
namespace Socialize.Modules.Approvals;
|
namespace Socialize.Api.Modules.Approvals;
|
||||||
|
|
||||||
public static class DependencyInjection
|
public static class DependencyInjection
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
|
using FastEndpoints;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using Socialize.Infrastructure.Security;
|
using Socialize.Api.Data;
|
||||||
using Socialize.Modules.Notifications.Contracts;
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
using Socialize.Api.Modules.Approvals.Data;
|
||||||
|
using Socialize.Api.Modules.Notifications.Contracts;
|
||||||
|
|
||||||
namespace Socialize.Modules.Approvals.Handlers;
|
namespace Socialize.Api.Modules.Approvals.Handlers;
|
||||||
|
|
||||||
public record CreateApprovalRequestRequest(
|
public record CreateApprovalRequestRequest(
|
||||||
Guid WorkspaceId,
|
Guid WorkspaceId,
|
||||||
@@ -39,7 +43,8 @@ public class CreateApprovalRequestHandler(
|
|||||||
|
|
||||||
public override async Task HandleAsync(CreateApprovalRequestRequest request, CancellationToken ct)
|
public override async Task HandleAsync(CreateApprovalRequestRequest request, CancellationToken ct)
|
||||||
{
|
{
|
||||||
ContentItem? contentItem = await dbContext.ContentItems
|
var contentItem = await dbContext
|
||||||
|
.ContentItems
|
||||||
.SingleOrDefaultAsync(
|
.SingleOrDefaultAsync(
|
||||||
candidate => candidate.Id == request.ContentItemId && candidate.WorkspaceId == request.WorkspaceId,
|
candidate => candidate.Id == request.ContentItemId && candidate.WorkspaceId == request.WorkspaceId,
|
||||||
ct);
|
ct);
|
||||||
@@ -57,7 +62,7 @@ public class CreateApprovalRequestHandler(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApprovalRequest approval = new()
|
var approval = new ApprovalRequest()
|
||||||
{
|
{
|
||||||
Id = Guid.NewGuid(),
|
Id = Guid.NewGuid(),
|
||||||
WorkspaceId = request.WorkspaceId,
|
WorkspaceId = request.WorkspaceId,
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
using Socialize.Infrastructure.Security;
|
using FastEndpoints;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Socialize.Api.Data;
|
||||||
|
using Socialize.Api.Modules.Approvals.Data;
|
||||||
|
using Socialize.Api.Modules.ContentItems.Data;
|
||||||
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
|
||||||
namespace Socialize.Modules.Approvals.Handlers;
|
namespace Socialize.Api.Modules.Approvals.Handlers;
|
||||||
|
|
||||||
public record GetApprovalsRequest(Guid ContentItemId);
|
public record GetApprovalsRequest(Guid ContentItemId);
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
using Socialize.Infrastructure.Security;
|
using FastEndpoints;
|
||||||
using Socialize.Modules.Notifications.Contracts;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Socialize.Api.Data;
|
||||||
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
using Socialize.Api.Modules.ContentItems.Data;
|
||||||
|
using Socialize.Api.Modules.Approvals.Data;
|
||||||
|
using Socialize.Api.Modules.Notifications.Contracts;
|
||||||
|
|
||||||
namespace Socialize.Modules.Approvals.Handlers;
|
namespace Socialize.Api.Modules.Approvals.Handlers;
|
||||||
|
|
||||||
public record SubmitApprovalDecisionRequest(
|
public record SubmitApprovalDecisionRequest(
|
||||||
string Decision,
|
string Decision,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Socialize.Modules.Assets.Data;
|
namespace Socialize.Api.Modules.Assets.Data;
|
||||||
|
|
||||||
public class Asset
|
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
|
public static class AssetModelConfiguration
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Socialize.Modules.Assets.Data;
|
namespace Socialize.Api.Modules.Assets.Data;
|
||||||
|
|
||||||
public class AssetRevision
|
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
|
public static class DependencyInjection
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
using Socialize.Infrastructure.Security;
|
using FastEndpoints;
|
||||||
using Socialize.Modules.Notifications.Contracts;
|
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(
|
public record CreateAssetRevisionRequest(
|
||||||
string SourceReference,
|
string SourceReference,
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
using Socialize.Infrastructure.Security;
|
using FastEndpoints;
|
||||||
using Socialize.Modules.Notifications.Contracts;
|
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(
|
public record CreateGoogleDriveAssetRequest(
|
||||||
Guid WorkspaceId,
|
Guid WorkspaceId,
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
using Socialize.Infrastructure.Security;
|
using FastEndpoints;
|
||||||
namespace Socialize.Modules.Assets.Handlers;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Socialize.Api.Data;
|
||||||
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
|
||||||
|
namespace Socialize.Api.Modules.Assets.Handlers;
|
||||||
|
|
||||||
public record GetAssetsRequest(Guid ContentItemId);
|
public record GetAssetsRequest(Guid ContentItemId);
|
||||||
|
|
||||||
@@ -40,7 +44,7 @@ public class GetAssetsHandler(
|
|||||||
|
|
||||||
public override async Task HandleAsync(GetAssetsRequest request, CancellationToken ct)
|
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);
|
.SingleOrDefaultAsync(candidate => candidate.Id == request.ContentItemId, ct);
|
||||||
if (item is null)
|
if (item is null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Socialize.Modules.Clients.Data;
|
namespace Socialize.Api.Modules.Clients.Data;
|
||||||
|
|
||||||
public class Client
|
public class Client
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
namespace Socialize.Modules.Clients.Data;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
|
namespace Socialize.Api.Modules.Clients.Data;
|
||||||
|
|
||||||
public static class ClientModelConfiguration
|
public static class ClientModelConfiguration
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using Socialize.Modules.Clients.Data;
|
using Socialize.Api.Modules.Clients.Data;
|
||||||
|
|
||||||
namespace Socialize.Modules.Clients;
|
namespace Socialize.Api.Modules.Clients;
|
||||||
|
|
||||||
public static class DependencyInjection
|
public static class DependencyInjection
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
using Socialize.Infrastructure.BlobStorage.Contracts;
|
using FastEndpoints;
|
||||||
using Socialize.Infrastructure.Security;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Socialize.Modules.Clients.Data;
|
using Socialize.Api.Data;
|
||||||
|
using Socialize.Api.Infrastructure.BlobStorage.Contracts;
|
||||||
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
using Socialize.Api.Modules.Clients.Data;
|
||||||
|
|
||||||
namespace Socialize.Modules.Clients.Handlers;
|
namespace Socialize.Api.Modules.Clients.Handlers;
|
||||||
|
|
||||||
public record ChangeClientPortraitRequest(
|
public record ChangeClientPortraitRequest(
|
||||||
IFormFile File);
|
IFormFile File);
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
using Socialize.Infrastructure.Security;
|
using FastEndpoints;
|
||||||
namespace Socialize.Modules.Clients.Handlers;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Socialize.Api.Data;
|
||||||
|
using Socialize.Api.Modules.Clients.Data;
|
||||||
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
|
||||||
|
namespace Socialize.Api.Modules.Clients.Handlers;
|
||||||
|
|
||||||
public record CreateClientRequest(
|
public record CreateClientRequest(
|
||||||
Guid WorkspaceId,
|
Guid WorkspaceId,
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
using Socialize.Infrastructure.Security;
|
using FastEndpoints;
|
||||||
using Socialize.Modules.Clients.Data;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Socialize.Api.Data;
|
||||||
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
using Socialize.Api.Modules.Clients.Data;
|
||||||
|
|
||||||
namespace Socialize.Modules.Clients.Handlers;
|
namespace Socialize.Api.Modules.Clients.Handlers;
|
||||||
|
|
||||||
public record GetClientsRequest(Guid? WorkspaceId);
|
public record GetClientsRequest(Guid? WorkspaceId);
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
using Socialize.Infrastructure.Security;
|
using FastEndpoints;
|
||||||
using Socialize.Modules.Clients.Data;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Socialize.Api.Data;
|
||||||
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
using Socialize.Api.Modules.Clients.Data;
|
||||||
|
|
||||||
namespace Socialize.Modules.Clients.Handlers;
|
namespace Socialize.Api.Modules.Clients.Handlers;
|
||||||
|
|
||||||
public record UpdateClientRequest(
|
public record UpdateClientRequest(
|
||||||
string Name,
|
string Name,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Socialize.Modules.Comments.Data;
|
namespace Socialize.Api.Modules.Comments.Data;
|
||||||
|
|
||||||
public class Comment
|
public class Comment
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
namespace Socialize.Modules.Comments.Data;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
|
namespace Socialize.Api.Modules.Comments.Data;
|
||||||
|
|
||||||
public static class CommentModelConfiguration
|
public static class CommentModelConfiguration
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using Socialize.Modules.Comments.Data;
|
using Socialize.Api.Modules.Comments.Data;
|
||||||
|
|
||||||
namespace Socialize.Modules.Comments;
|
namespace Socialize.Api.Modules.Comments;
|
||||||
|
|
||||||
public static class DependencyInjection
|
public static class DependencyInjection
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
using Socialize.Infrastructure.Security;
|
using FastEndpoints;
|
||||||
using Socialize.Modules.Notifications.Contracts;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Socialize.Api.Data;
|
||||||
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
using Socialize.Api.Modules.ContentItems.Data;
|
||||||
|
using Socialize.Api.Modules.Comments.Data;
|
||||||
|
using Socialize.Api.Modules.Notifications.Contracts;
|
||||||
|
|
||||||
namespace Socialize.Modules.Comments.Handlers;
|
namespace Socialize.Api.Modules.Comments.Handlers;
|
||||||
|
|
||||||
public record CreateCommentRequest(
|
public record CreateCommentRequest(
|
||||||
Guid WorkspaceId,
|
Guid WorkspaceId,
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
using Socialize.Infrastructure.Security;
|
using FastEndpoints;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Socialize.Api.Data;
|
||||||
|
using Socialize.Api.Modules.Comments.Data;
|
||||||
|
using Socialize.Api.Modules.ContentItems.Data;
|
||||||
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
|
||||||
namespace Socialize.Modules.Comments.Handlers;
|
namespace Socialize.Api.Modules.Comments.Handlers;
|
||||||
|
|
||||||
public record GetCommentsRequest(Guid ContentItemId);
|
public record GetCommentsRequest(Guid ContentItemId);
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
using Socialize.Infrastructure.Security;
|
using FastEndpoints;
|
||||||
using Socialize.Modules.Notifications.Contracts;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Socialize.Api.Data;
|
||||||
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
using Socialize.Api.Modules.Comments.Data;
|
||||||
|
using Socialize.Api.Modules.ContentItems.Data;
|
||||||
|
using Socialize.Api.Modules.Notifications.Contracts;
|
||||||
|
|
||||||
namespace Socialize.Modules.Comments.Handlers;
|
namespace Socialize.Api.Modules.Comments.Handlers;
|
||||||
|
|
||||||
public class ResolveCommentHandler(
|
public class ResolveCommentHandler(
|
||||||
AppDbContext dbContext,
|
AppDbContext dbContext,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Socialize.Modules.ContentItems.Data;
|
namespace Socialize.Api.Modules.ContentItems.Data;
|
||||||
|
|
||||||
public class ContentItem
|
public class ContentItem
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
namespace Socialize.Modules.ContentItems.Data;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
|
namespace Socialize.Api.Modules.ContentItems.Data;
|
||||||
|
|
||||||
public static class ContentItemModelConfiguration
|
public static class ContentItemModelConfiguration
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Socialize.Modules.ContentItems.Data;
|
namespace Socialize.Api.Modules.ContentItems.Data;
|
||||||
|
|
||||||
public class ContentItemRevision
|
public class ContentItemRevision
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using Socialize.Modules.ContentItems.Data;
|
using Socialize.Api.Modules.ContentItems.Data;
|
||||||
|
|
||||||
namespace Socialize.Modules.ContentItems;
|
namespace Socialize.Api.Modules.ContentItems;
|
||||||
|
|
||||||
public static class DependencyInjection
|
public static class DependencyInjection
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
using Socialize.Infrastructure.Security;
|
using FastEndpoints;
|
||||||
using Socialize.Modules.Notifications.Contracts;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Socialize.Api.Data;
|
||||||
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
using Socialize.Api.Modules.Notifications.Contracts;
|
||||||
|
using Socialize.Api.Modules.ContentItems.Data;
|
||||||
|
using Socialize.Api.Modules.Workspaces.Data;
|
||||||
|
|
||||||
namespace Socialize.Modules.ContentItems.Handlers;
|
namespace Socialize.Api.Modules.ContentItems.Handlers;
|
||||||
|
|
||||||
public record CreateContentItemRequest(
|
public record CreateContentItemRequest(
|
||||||
Guid WorkspaceId,
|
Guid WorkspaceId,
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
using Socialize.Infrastructure.Security;
|
using FastEndpoints;
|
||||||
using Socialize.Modules.Notifications.Contracts;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Socialize.Api.Data;
|
||||||
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
using Socialize.Api.Modules.ContentItems.Data;
|
||||||
|
using Socialize.Api.Modules.Notifications.Contracts;
|
||||||
|
|
||||||
namespace Socialize.Modules.ContentItems.Handlers;
|
namespace Socialize.Api.Modules.ContentItems.Handlers;
|
||||||
|
|
||||||
public record CreateContentItemRevisionRequest(
|
public record CreateContentItemRevisionRequest(
|
||||||
string Title,
|
string Title,
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
using Socialize.Infrastructure.Security;
|
using FastEndpoints;
|
||||||
using Socialize.Modules.ContentItems.Data;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Socialize.Api.Data;
|
||||||
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
using Socialize.Api.Modules.ContentItems.Data;
|
||||||
|
|
||||||
namespace Socialize.Modules.ContentItems.Handlers;
|
namespace Socialize.Api.Modules.ContentItems.Handlers;
|
||||||
|
|
||||||
public record ContentItemDetailDto(
|
public record ContentItemDetailDto(
|
||||||
Guid Id,
|
Guid Id,
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
using Socialize.Infrastructure.Security;
|
using FastEndpoints;
|
||||||
namespace Socialize.Modules.ContentItems.Handlers;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Socialize.Api.Data;
|
||||||
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
using Socialize.Api.Modules.ContentItems.Data;
|
||||||
|
|
||||||
|
namespace Socialize.Api.Modules.ContentItems.Handlers;
|
||||||
|
|
||||||
public record ContentItemRevisionDto(
|
public record ContentItemRevisionDto(
|
||||||
Guid Id,
|
Guid Id,
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
using Socialize.Infrastructure.Security;
|
using FastEndpoints;
|
||||||
using Socialize.Modules.ContentItems.Data;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Socialize.Api.Data;
|
||||||
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
using Socialize.Api.Modules.ContentItems.Data;
|
||||||
|
|
||||||
namespace Socialize.Modules.ContentItems.Handlers;
|
namespace Socialize.Api.Modules.ContentItems.Handlers;
|
||||||
|
|
||||||
public record GetContentItemsRequest(Guid? WorkspaceId, Guid? ClientId, Guid? ProjectId);
|
public record GetContentItemsRequest(Guid? WorkspaceId, Guid? ClientId, Guid? ProjectId);
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
using Socialize.Infrastructure.Security;
|
using FastEndpoints;
|
||||||
using Socialize.Modules.ContentItems.Data;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Socialize.Modules.Notifications.Contracts;
|
using Socialize.Api.Data;
|
||||||
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
using Socialize.Api.Modules.ContentItems.Data;
|
||||||
|
using Socialize.Api.Modules.Notifications.Contracts;
|
||||||
|
|
||||||
namespace Socialize.Modules.ContentItems.Handlers;
|
namespace Socialize.Api.Modules.ContentItems.Handlers;
|
||||||
|
|
||||||
public record UpdateContentItemStatusRequest(string Status);
|
public record UpdateContentItemStatusRequest(string Status);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Socialize.Modules.Identity.Configuration;
|
namespace Socialize.Api.Modules.Identity.Configuration;
|
||||||
|
|
||||||
public record JwtOptions
|
public record JwtOptions
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Socialize.Modules.Identity.Contracts;
|
namespace Socialize.Api.Modules.Identity.Contracts;
|
||||||
|
|
||||||
public interface IUserLookup
|
public interface IUserLookup
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Socialize.Modules.Identity.Contracts;
|
namespace Socialize.Api.Modules.Identity.Contracts;
|
||||||
|
|
||||||
public static class KnownRoles
|
public static class KnownRoles
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Socialize.Modules.Identity.Contracts;
|
namespace Socialize.Api.Modules.Identity.Contracts;
|
||||||
|
|
||||||
public record UserReference(
|
public record UserReference(
|
||||||
Guid Id,
|
Guid Id,
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
using Socialize.Infrastructure.Security;
|
using Socialize.Api.Infrastructure.Security;
|
||||||
using Socialize.Modules.Identity.Models;
|
using Socialize.Api.Modules.Identity.Models;
|
||||||
|
|
||||||
namespace Socialize.Modules.Identity.Data;
|
namespace Socialize.Api.Modules.Identity.Data;
|
||||||
|
|
||||||
public class IdentityService(
|
public class IdentityService(
|
||||||
UserManager userManager,
|
UserManager userManager,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
|
|
||||||
namespace Socialize.Modules.Identity.Data;
|
namespace Socialize.Api.Modules.Identity.Data;
|
||||||
|
|
||||||
public class Role : IdentityRole<Guid>
|
public class Role : IdentityRole<Guid>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
|
|
||||||
namespace Socialize.Modules.Identity.Data;
|
namespace Socialize.Api.Modules.Identity.Data;
|
||||||
|
|
||||||
public class User : IdentityUser<Guid>
|
public class User : IdentityUser<Guid>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
|
|
||||||
namespace Socialize.Modules.Identity.Data;
|
namespace Socialize.Api.Modules.Identity.Data;
|
||||||
|
|
||||||
public sealed class UserManager(
|
public sealed class UserManager(
|
||||||
IUserStore<User> store,
|
IUserStore<User> store,
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
using Socialize.Data;
|
using Socialize.Api.Data;
|
||||||
using Socialize.Modules.Identity.Configuration;
|
using Socialize.Api.Modules.Identity.Configuration;
|
||||||
using Socialize.Modules.Identity.Contracts;
|
using Socialize.Api.Modules.Identity.Contracts;
|
||||||
using Socialize.Modules.Identity.Data;
|
using Socialize.Api.Modules.Identity.Data;
|
||||||
using Socialize.Modules.Identity.Services;
|
using Socialize.Api.Modules.Identity.Services;
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
|
|
||||||
namespace Socialize.Modules.Identity;
|
namespace Socialize.Api.Modules.Identity;
|
||||||
|
|
||||||
public static class DependencyInjection
|
public static class DependencyInjection
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
using Socialize.Infrastructure.Security;
|
using FastEndpoints;
|
||||||
using Socialize.Modules.Identity.Data;
|
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
using Socialize.Api.Modules.Identity.Data;
|
||||||
|
|
||||||
namespace Socialize.Modules.Identity.Handlers;
|
namespace Socialize.Api.Modules.Identity.Handlers;
|
||||||
|
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public record ChangeAddressRequest(
|
public record ChangeAddressRequest(
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
using Socialize.Infrastructure.Security;
|
using FastEndpoints;
|
||||||
using Socialize.Modules.Identity.Data;
|
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
using Socialize.Api.Modules.Identity.Data;
|
||||||
|
|
||||||
namespace Socialize.Modules.Identity.Handlers;
|
namespace Socialize.Api.Modules.Identity.Handlers;
|
||||||
|
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public record ChangeAliasRequest(
|
public record ChangeAliasRequest(
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
using Socialize.Infrastructure.Security;
|
using FastEndpoints;
|
||||||
using Socialize.Modules.Identity.Data;
|
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
using Socialize.Api.Modules.Identity.Data;
|
||||||
|
|
||||||
namespace Socialize.Modules.Identity.Handlers;
|
namespace Socialize.Api.Modules.Identity.Handlers;
|
||||||
|
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public record ChangeBirthDateRequest(
|
public record ChangeBirthDateRequest(
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
using Socialize.Infrastructure.Security;
|
using FastEndpoints;
|
||||||
using Socialize.Modules.Identity.Data;
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
using Socialize.Api.Modules.Identity.Data;
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
|
|
||||||
namespace Socialize.Modules.Identity.Handlers;
|
namespace Socialize.Api.Modules.Identity.Handlers;
|
||||||
|
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public record ChangeEmailRequest(
|
public record ChangeEmailRequest(
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
using Socialize.Infrastructure.Security;
|
using FastEndpoints;
|
||||||
using Socialize.Modules.Identity.Data;
|
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
using Socialize.Api.Modules.Identity.Data;
|
||||||
|
|
||||||
namespace Socialize.Modules.Identity.Handlers;
|
namespace Socialize.Api.Modules.Identity.Handlers;
|
||||||
|
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public record ChangeFullnameRequest(
|
public record ChangeFullnameRequest(
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
using Socialize.Infrastructure.Security;
|
using FastEndpoints;
|
||||||
using Socialize.Modules.Identity.Data;
|
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
using Socialize.Api.Modules.Identity.Data;
|
||||||
|
|
||||||
namespace Socialize.Modules.Identity.Handlers;
|
namespace Socialize.Api.Modules.Identity.Handlers;
|
||||||
|
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public record ChangePhoneRequest(
|
public record ChangePhoneRequest(
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
using Socialize.Infrastructure.BlobStorage.Contracts;
|
using FastEndpoints;
|
||||||
using Socialize.Infrastructure.Security;
|
|
||||||
using Socialize.Modules.Identity.Data;
|
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
|
using Socialize.Api.Infrastructure.BlobStorage.Contracts;
|
||||||
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
using Socialize.Api.Modules.Identity.Data;
|
||||||
|
|
||||||
namespace Socialize.Modules.Identity.Handlers;
|
namespace Socialize.Api.Modules.Identity.Handlers;
|
||||||
|
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public record ChangePortraitRequest(
|
public record ChangePortraitRequest(
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
using System.Web;
|
using FastEndpoints;
|
||||||
using Socialize.Infrastructure.Configuration;
|
|
||||||
using Socialize.Infrastructure.Emailer.Contracts;
|
|
||||||
using Socialize.Modules.Identity.Data;
|
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
|
using System.Web;
|
||||||
|
using Socialize.Api.Infrastructure.Configuration;
|
||||||
|
using Socialize.Api.Infrastructure.Emailer.Contracts;
|
||||||
|
using Socialize.Api.Modules.Identity.Data;
|
||||||
|
|
||||||
namespace Socialize.Modules.Identity.Handlers;
|
namespace Socialize.Api.Modules.Identity.Handlers;
|
||||||
|
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public record ForgotPasswordRequest(
|
public record ForgotPasswordRequest(
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
|
using FastEndpoints;
|
||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
using Socialize.Modules.Identity.Data;
|
using Socialize.Api.Modules.Identity.Data;
|
||||||
using Socialize.Modules.Identity.Models;
|
using Socialize.Api.Modules.Identity.Models;
|
||||||
using Socialize.Infrastructure.Security;
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
|
||||||
namespace Socialize.Modules.Identity.Handlers;
|
namespace Socialize.Api.Modules.Identity.Handlers;
|
||||||
|
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public class GetCurrentUserQueryHandler(
|
public class GetCurrentUserQueryHandler(
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
using Socialize.Infrastructure.BlobStorage.Contracts;
|
using FastEndpoints;
|
||||||
using Socialize.Modules.Identity.Data;
|
using Socialize.Api.Infrastructure.BlobStorage.Contracts;
|
||||||
using Socialize.Modules.Identity.Models;
|
using Socialize.Api.Modules.Identity.Data;
|
||||||
|
using Socialize.Api.Modules.Identity.Models;
|
||||||
|
|
||||||
namespace Socialize.Modules.Identity.Handlers;
|
namespace Socialize.Api.Modules.Identity.Handlers;
|
||||||
|
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public class GetCurrentUserPortraitHandler(
|
public class GetCurrentUserPortraitHandler(
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
using Socialize.Infrastructure.Security;
|
using FastEndpoints;
|
||||||
using Socialize.Modules.Identity.Data;
|
|
||||||
using Socialize.Modules.Identity.Configuration;
|
|
||||||
using Socialize.Modules.Identity.Services;
|
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
using Socialize.Api.Modules.Identity.Data;
|
||||||
|
using Socialize.Api.Modules.Identity.Configuration;
|
||||||
|
using Socialize.Api.Modules.Identity.Services;
|
||||||
|
|
||||||
namespace Socialize.Modules.Identity.Handlers;
|
namespace Socialize.Api.Modules.Identity.Handlers;
|
||||||
|
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public record LoginRequest(
|
public record LoginRequest(
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
using System.Text.Json;
|
using FastEndpoints;
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
using Socialize.Infrastructure.Security;
|
|
||||||
using Socialize.Modules.Identity.Configuration;
|
|
||||||
using Socialize.Modules.Identity.Data;
|
|
||||||
using Socialize.Modules.Identity.Services;
|
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
|
using System.Text.Json;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
using Socialize.Api.Modules.Identity.Configuration;
|
||||||
|
using Socialize.Api.Modules.Identity.Data;
|
||||||
|
using Socialize.Api.Modules.Identity.Services;
|
||||||
|
|
||||||
namespace Socialize.Modules.Identity.Handlers;
|
namespace Socialize.Api.Modules.Identity.Handlers;
|
||||||
|
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public class FacebookUserInfo
|
public class FacebookUserInfo
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
using System.Text.Json;
|
using FastEndpoints;
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
using Socialize.Infrastructure.Security;
|
|
||||||
using Socialize.Modules.Identity.Configuration;
|
|
||||||
using Socialize.Modules.Identity.Data;
|
|
||||||
using Socialize.Modules.Identity.Services;
|
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
|
using System.Text.Json;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
using Socialize.Api.Modules.Identity.Configuration;
|
||||||
|
using Socialize.Api.Modules.Identity.Data;
|
||||||
|
using Socialize.Api.Modules.Identity.Services;
|
||||||
|
|
||||||
namespace Socialize.Modules.Identity.Handlers;
|
namespace Socialize.Api.Modules.Identity.Handlers;
|
||||||
|
|
||||||
internal class GoogleToken
|
internal class GoogleToken
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
using Socialize.Infrastructure.Security;
|
using FastEndpoints;
|
||||||
using Socialize.Modules.Identity.Configuration;
|
|
||||||
using Socialize.Modules.Identity.Data;
|
|
||||||
using Socialize.Modules.Identity.Services;
|
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
using Socialize.Api.Modules.Identity.Configuration;
|
||||||
|
using Socialize.Api.Modules.Identity.Data;
|
||||||
|
using Socialize.Api.Modules.Identity.Services;
|
||||||
|
|
||||||
namespace Socialize.Modules.Identity.Handlers;
|
namespace Socialize.Api.Modules.Identity.Handlers;
|
||||||
|
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public record RefreshTokenRequest(
|
public record RefreshTokenRequest(
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
using Socialize.Modules.Identity.Data;
|
using FastEndpoints;
|
||||||
using Socialize.Modules.Identity.Services;
|
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
|
using Socialize.Api.Modules.Identity.Data;
|
||||||
|
using Socialize.Api.Modules.Identity.Services;
|
||||||
|
|
||||||
namespace Socialize.Modules.Identity.Handlers;
|
namespace Socialize.Api.Modules.Identity.Handlers;
|
||||||
|
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public record RegisterRequest(
|
public record RegisterRequest(
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
using Socialize.Modules.Identity.Data;
|
using FastEndpoints;
|
||||||
using Socialize.Modules.Identity.Services;
|
using Socialize.Api.Modules.Identity.Data;
|
||||||
|
using Socialize.Api.Modules.Identity.Services;
|
||||||
|
|
||||||
namespace Socialize.Modules.Identity.Handlers;
|
namespace Socialize.Api.Modules.Identity.Handlers;
|
||||||
|
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public record ResendVerificationRequest(
|
public record ResendVerificationRequest(
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
using Socialize.Modules.Identity.Data;
|
using FastEndpoints;
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
|
using Socialize.Api.Modules.Identity.Data;
|
||||||
|
|
||||||
namespace Socialize.Modules.Identity.Handlers;
|
namespace Socialize.Api.Modules.Identity.Handlers;
|
||||||
|
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public record ResetPasswordRequest(
|
public record ResetPasswordRequest(
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
using Socialize.Infrastructure.Security;
|
using FastEndpoints;
|
||||||
using Socialize.Modules.Identity.Data;
|
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
|
using Socialize.Api.Infrastructure.Security;
|
||||||
|
using Socialize.Api.Modules.Identity.Data;
|
||||||
|
|
||||||
namespace Socialize.Modules.Identity.Handlers;
|
namespace Socialize.Api.Modules.Identity.Handlers;
|
||||||
|
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public record SetPasswordRequest(
|
public record SetPasswordRequest(
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
using System.Web;
|
using FastEndpoints;
|
||||||
using Socialize.Modules.Identity.Data;
|
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
|
using System.Web;
|
||||||
|
using Socialize.Api.Modules.Identity.Data;
|
||||||
|
|
||||||
namespace Socialize.Modules.Identity.Handlers;
|
namespace Socialize.Api.Modules.Identity.Handlers;
|
||||||
|
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public record VerifyEmailRequest(
|
public record VerifyEmailRequest(
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using Socialize.Modules.Identity.Models;
|
using Socialize.Api.Modules.Identity.Models;
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
|
|
||||||
namespace Socialize.Modules.Identity;
|
namespace Socialize.Api.Modules.Identity;
|
||||||
|
|
||||||
public static class IdentityResultExtensions
|
public static class IdentityResultExtensions
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Socialize.Modules.Identity.Models;
|
namespace Socialize.Api.Modules.Identity.Models;
|
||||||
|
|
||||||
public class Result(
|
public class Result(
|
||||||
bool succeeded,
|
bool succeeded,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Socialize.Modules.Identity.Models;
|
namespace Socialize.Api.Modules.Identity.Models;
|
||||||
|
|
||||||
public class RoleModel
|
public class RoleModel
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Socialize.Modules.Identity.Models;
|
namespace Socialize.Api.Modules.Identity.Models;
|
||||||
|
|
||||||
public class UserDto
|
public class UserDto
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Socialize.Modules.Identity.Models;
|
namespace Socialize.Api.Modules.Identity.Models;
|
||||||
|
|
||||||
public class UserModel
|
public class UserModel
|
||||||
{
|
{
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user