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!,
|
PublishUser = string.IsNullOrWhiteSpace(CurrentUser.UserName) ? CurrentUser.GetId<int>().ToString() : CurrentUser.UserName!,
|
||||||
PublishTime = DateTime.Now,
|
PublishTime = DateTime.Now,
|
||||||
Description = description,
|
Description = description,
|
||||||
Content = OmsDocHelper.SerializeJson(snapshot)
|
Content = OmsDocHelper.SerializeSnapshotJson(snapshot)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -20,6 +20,7 @@ public static class OmsDocHelper
|
|||||||
private static readonly JsonSerializerOptions SnapshotJsonOptions = new()
|
private static readonly JsonSerializerOptions SnapshotJsonOptions = new()
|
||||||
{
|
{
|
||||||
PropertyNameCaseInsensitive = true,
|
PropertyNameCaseInsensitive = true,
|
||||||
|
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
|
||||||
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
|
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user