Skip to content

Commit 8d53fd1

Browse files
committed
When returning strings using Results.XXX we should always use Content because otherwise the result returned is distorted
1 parent a665777 commit 8d53fd1

File tree

1 file changed

+2
-2
lines changed
  • Source/LocalNetAppChat/LocalNetAppChat.Server

1 file changed

+2
-2
lines changed

Source/LocalNetAppChat/LocalNetAppChat.Server/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
if (!result.IsSuccess)
9292
return Results.BadRequest(result.Error);
9393

94-
return Results.Ok(result.Value);
94+
return Results.Content(result.Value);
9595
});
9696

9797

@@ -122,7 +122,7 @@
122122
if (!result.IsSuccess)
123123
return Results.BadRequest(result.Error);
124124

125-
return Results.Ok(result.Value);
125+
return Results.Content(result.Value);
126126
});
127127

128128
app.Run();

0 commit comments

Comments
 (0)