fix: align service channel publish snapshot JSON with preview API
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
a4d7c89e44
commit
ecfaad3824
@ -246,7 +246,7 @@ public partial class ServiceChannelService
|
||||
PublishUser = string.IsNullOrWhiteSpace(CurrentUser.UserName) ? CurrentUser.GetId<int>().ToString() : CurrentUser.UserName!,
|
||||
PublishTime = DateTime.Now,
|
||||
Description = description,
|
||||
Content = OmsDocHelper.SerializeJson(snapshot)
|
||||
Content = OmsDocHelper.SerializeSnapshotJson(snapshot)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -20,6 +20,7 @@ public static class OmsDocHelper
|
||||
private static readonly JsonSerializerOptions SnapshotJsonOptions = new()
|
||||
{
|
||||
PropertyNameCaseInsensitive = true,
|
||||
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
|
||||
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user