Ensure creator related blobs are stored in the creator container
This commit is contained in:
@@ -2,6 +2,6 @@
|
||||
|
||||
public static class ContainerNames
|
||||
{
|
||||
public static string Users = "users";
|
||||
public static string Creators = "creators";
|
||||
public const string Users = "users";
|
||||
public const string Creators = "creators";
|
||||
}
|
||||
|
||||
@@ -43,9 +43,8 @@ public class ChangeBannerHandler(
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: this upload should be done to the Creators container
|
||||
var blobUrl = await blobStorage.UploadFileAsync(
|
||||
ContainerNames.Users,
|
||||
ContainerNames.Creators,
|
||||
$"{request.CreatorId}/{SubDirectoryNames.Profile}/{CommonFileNames.BannerPicture}",
|
||||
request.File.OpenReadStream(),
|
||||
request.File.ContentType,
|
||||
|
||||
@@ -56,7 +56,7 @@ public class ChangeLogoHandler(
|
||||
|
||||
// TODO: this upload should be done to the Creators container
|
||||
var blobUrl = await blobStorage.UploadFileAsync(
|
||||
ContainerNames.Users,
|
||||
ContainerNames.Creators,
|
||||
$"{request.CreatorId}/{SubDirectoryNames.Profile}/{CommonFileNames.ProfilePicture}",
|
||||
request.File.OpenReadStream(),
|
||||
request.File.ContentType,
|
||||
|
||||
@@ -138,9 +138,8 @@ public sealed class PostContent(
|
||||
IFormFile file,
|
||||
CancellationToken ct = default)
|
||||
{
|
||||
// TODO: I would like us to use ContainerNames.Creators but it seems we are missing configurations @jbourdon
|
||||
var url = await blobStorage.UploadFileAsync(
|
||||
ContainerNames.Users,
|
||||
ContainerNames.Creators,
|
||||
$"{creatorId}/{SubDirectoryNames.Contents}/{contentId}/{file.FileName}",
|
||||
file.OpenReadStream(),
|
||||
file.ContentType,
|
||||
|
||||
@@ -31,7 +31,6 @@ public class ChangeAddressHandler(
|
||||
}
|
||||
|
||||
user.Address = request.Address;
|
||||
// TODO: check to see if identity resets the email-validated flag - @jonathan
|
||||
|
||||
var result = await userManager.UpdateAsync(user);
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ public class ChangeEmailHandler(
|
||||
}
|
||||
|
||||
user.Email = request.Email;
|
||||
// TODO: check to see if identity resets the email-validated flag - @jonathan
|
||||
|
||||
// TODO: check to see if identity resets the `email confirmed` flag - @jonathan
|
||||
var result = await userManager.UpdateAsync(user);
|
||||
|
||||
if (result.Succeeded)
|
||||
|
||||
@@ -31,7 +31,7 @@ public class ChangePhoneHandler(
|
||||
}
|
||||
|
||||
user.PhoneNumber = request.PhoneNumber;
|
||||
// TODO: check to see if identity resets the email-validated flag - @jonathan
|
||||
// TODO: check to see if identity resets the `phone confirmed` flag - @jonathan
|
||||
|
||||
var result = await userManager.UpdateAsync(user);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user