mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 21:16:49 +00:00
feat(apiv2): post/patch endpoints
This commit is contained in:
parent
fd49e7e4ea
commit
e367ed6808
4 changed files with 83 additions and 29 deletions
|
|
@ -165,8 +165,7 @@ namespace PluralKit.API
|
|||
|
||||
var valueStr = data.Value<string>("timestamp").NullIfEmpty();
|
||||
if (valueStr == null)
|
||||
// todo
|
||||
throw Errors.GenericBadRequest;
|
||||
throw new ModelParseError(new List<ValidationError>() { new ValidationError("timestamp", $"Key 'timestamp' is required.") });
|
||||
|
||||
var value = Instant.FromDateTimeOffset(DateTime.Parse(valueStr).ToUniversalTime());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue