feature/api #2

Closed
njooris wants to merge 0 commits from feature/api into master
Owner
No description provided.
lcesbron requested changes 2026-08-19 13:28:09 +00:00
Dismissed
lcesbron left a comment

Add a GetAvatarById endpoint in the user ApiUser

Check difference between typedResults and results.

Add a GetAvatarById endpoint in the user ApiUser Check difference between typedResults and results.
@ -0,0 +6,4 @@
static public class ApiUser
{
static public async Task<IResult> PutUser(int id, User.UserDtoPut UserDtoEntity, UserDbContext db)
Owner

Avatar isn't properly fetched

Avatar isn't properly fetched
lcesbron marked this conversation as resolved
@ -0,0 +36,4 @@
if (entry.State == EntityState.Modified || entry.State == EntityState.Added)
{
if (updatedAtProp != null)
entry.Property("Update_at").CurrentValue = DateTime.UtcNow;
Owner

Re add the created at like on the #1 PR

Re add the created at like on the #1 PR
lcesbron marked this conversation as resolved
@ -0,0 +64,4 @@
public string? Bio { get; set;}
public string? Country { get; set; }
public string FriendCode { get; init; } = RandomNumberGenerator.GetHexString(10);
public DateTime Created_at { get; init; } = DateTime.UtcNow;
Owner

Remove the management of created at, stay on the #1 PR version

Remove the management of created at, stay on the #1 PR version
lcesbron marked this conversation as resolved
@ -42,0 +45,4 @@
api.MapPatch("/country", ApiUser.PatchCountryById);
api.MapPatch("/bio", ApiUser.PatchBioById);
api.MapPatch("/avatar", ApiUser.PatchAvatarById).DisableAntiforgery();
api.MapGet("/avatar/{avatarName}", ApiUser.getAvatarByName);
Owner

You can do sub groups for user and avatar (Sucesses in the future)

You can do sub groups for user and avatar (Sucesses in the future)
lcesbron marked this conversation as resolved
lcesbron requested changes 2026-08-19 13:33:20 +00:00
Dismissed
@ -0,0 +118,4 @@
}
}
public class Succes
Owner

Typo : Sucess

Typo : Sucess
lcesbron marked this conversation as resolved
@ -0,0 +128,4 @@
public DateTime? Update_at { get; set; }
}
public class SuccesUser
Owner

SucessUser*

SucessUser*
lcesbron marked this conversation as resolved
@ -0,0 +124,4 @@
public int Id { get; set; }
public required string Name { get; set; }
public string? Legend { get; set; }
public DateTime? Created_at { get; set; } = DateTime.UtcNow;
Owner

Needs to be managed at interceptor

Needs to be managed at interceptor
lcesbron marked this conversation as resolved
@ -0,0 +136,4 @@
public required int Id_user { get; set; }
[ForeignKey("Succes")]
public required int Id_succes { get; set; }
public DateTime? Created_at { get; set; } = DateTime.UtcNow;
Owner

Needs to be managed at interceptor

Needs to be managed at interceptor
lcesbron marked this conversation as resolved
lcesbron approved these changes 2026-08-19 15:22:41 +00:00
lcesbron left a comment

Perfect, thanks

Perfect, thanks
nseon approved these changes 2026-09-08 13:19:51 +00:00
nseon left a comment

great work but pls make a check to not give the same friend code to 2 people.

great work but pls make a check to not give the same friend code to 2 people.
nseon scheduled this pull request to auto merge when all checks succeed 2026-09-08 13:20:33 +00:00
njooris closed this pull request 2026-09-09 09:22:34 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Terranaut/UserProfile!2
No description provided.