Ensure creator related blobs are stored in the creator container

This commit is contained in:
2024-09-04 22:08:02 -04:00
parent 1fc6ddaf8d
commit 6dc83ff9bd
7 changed files with 7 additions and 10 deletions

View File

@@ -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";
}

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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);

View File

@@ -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)

View File

@@ -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);