Skip to content

Commit 3929d09

Browse files
author
Oyvind Timian Dokk Husveg
committed
Fixed a missing DTO
1 parent 38f06b8 commit 3929d09

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

exercise.wwwapi/Endpoints/UserEndpoints.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,12 @@ public static async Task<IResult> UpdateUser(IRepository<User> repository, int i
206206
repository.Update(user);
207207
repository.Save();
208208

209-
return TypedResults.Ok(userPatch);
209+
ResponseDTO<UserPatchDTO> responseDTO = new ResponseDTO<UserPatchDTO> {
210+
Message = "success",
211+
Data = userPatch
212+
};
213+
214+
return TypedResults.Ok(responseDTO);
210215
}
211216
private static string CreateToken(User user, IConfigurationSettings config)
212217
{

0 commit comments

Comments
 (0)