API patch improvements
- add PatchObject.CheckIsValid - use transaction when creating member, as to not create a member if the patch is invalid - return edited system in `PATCH /s` endpoint
This commit is contained in:
@@ -1,7 +1,17 @@
|
||||
namespace PluralKit.Core
|
||||
using System;
|
||||
|
||||
namespace PluralKit.Core
|
||||
{
|
||||
|
||||
public class InvalidPatchException : Exception
|
||||
{
|
||||
public InvalidPatchException(string message) : base(message) {}
|
||||
}
|
||||
|
||||
public abstract class PatchObject
|
||||
{
|
||||
public abstract UpdateQueryBuilder Apply(UpdateQueryBuilder b);
|
||||
|
||||
public void CheckIsValid() {}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user