|
@@ -379,8 +379,8 @@ namespace PRSServer
|
|
|
|
|
|
return request.Respond()
|
|
|
.Cookie(new Cookie("SessionID", newSessionID.ToString(), LoginExpiry)) // Expires after 30 minutes
|
|
|
- .Type(new FlexibleContentType(ContentType.ApplicationJson))
|
|
|
.Content(new ResourceContent(Resource.FromString(responseString).Build()))
|
|
|
+ .Type(new FlexibleContentType(ContentType.ApplicationJson))
|
|
|
.Status(ResponseStatus.OK);
|
|
|
}
|
|
|
|
|
@@ -723,8 +723,8 @@ Model.LoadModel(
|
|
|
if (model.Response != null) return model.Response;
|
|
|
|
|
|
var response = model.Request.Respond()
|
|
|
- .Type(new FlexibleContentType(ContentType.TextHtml))
|
|
|
- .Content(compiledHTML);
|
|
|
+ .Content(compiledHTML)
|
|
|
+ .Type(new FlexibleContentType(ContentType.TextHtml));
|
|
|
foreach (var (key, value) in model.Cookies)
|
|
|
{
|
|
|
response.Cookie(new Cookie(key, value));
|
|
@@ -950,8 +950,8 @@ Model.LoadModel(
|
|
|
var returnJSON = Serialization.Serialize(SerializeEntityForEditing(entityType, entity));
|
|
|
|
|
|
return request.Respond()
|
|
|
- .Type(FlexibleContentType.Get(ContentType.ApplicationJson))
|
|
|
.Content(new ResourceContent(Resource.FromString(returnJSON).Build()))
|
|
|
+ .Type(FlexibleContentType.Get(ContentType.ApplicationJson))
|
|
|
.Status(ResponseStatus.OK);
|
|
|
}
|
|
|
|
|
@@ -1040,8 +1040,8 @@ Model.LoadModel(
|
|
|
var responseString = Serialization.Serialize(imgs);
|
|
|
|
|
|
return request.Respond()
|
|
|
- .Type(new FlexibleContentType(ContentType.ImageJpg))
|
|
|
- .Content(new ResourceContent(Resource.FromString(responseString).Build()));
|
|
|
+ .Content(new ResourceContent(Resource.FromString(responseString).Build()))
|
|
|
+ .Type(new FlexibleContentType(ContentType.ImageJpg));
|
|
|
}
|
|
|
|
|
|
var contentType = extension switch
|
|
@@ -1051,8 +1051,8 @@ Model.LoadModel(
|
|
|
_ => ContentType.TextPlain
|
|
|
};
|
|
|
return request.Respond()
|
|
|
- .Type(new FlexibleContentType(contentType))
|
|
|
- .Content(new ByteArrayResource(document.Data, document.FileName, FlexibleContentType.Get(contentType), null));
|
|
|
+ .Content(new ByteArrayResource(document.Data, document.FileName, FlexibleContentType.Get(contentType), null))
|
|
|
+ .Type(new FlexibleContentType(contentType));
|
|
|
}
|
|
|
|
|
|
#endregion
|