fix: explicitly return * in Patch queries
This is needed because the API takes the object from the database query to return to the user
This commit is contained in:
parent
0dd20c64ce
commit
502265973c
@ -10,7 +10,7 @@ namespace PluralKit.Core
|
||||
{
|
||||
_logger.Information("Updated account {accountId}: {@AccountPatch}", id, patch);
|
||||
var query = patch.Apply(new Query("accounts").Where("uid", id));
|
||||
await _db.ExecuteQuery(query);
|
||||
await _db.ExecuteQuery(query, extraSql: "returning *");
|
||||
}
|
||||
}
|
||||
}
|
@ -17,7 +17,7 @@ namespace PluralKit.Core
|
||||
{
|
||||
_logger.Information("Updated guild {GuildId}: {@GuildPatch}", guild, patch);
|
||||
var query = patch.Apply(new Query("servers").Where("id", guild));
|
||||
return _db.ExecuteQuery(query);
|
||||
return _db.ExecuteQuery(query, extraSql: "returning *");
|
||||
}
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ namespace PluralKit.Core
|
||||
{
|
||||
_logger.Information("Updated {SystemId} in guild {GuildId}: {@SystemGuildPatch}", system, guild, patch);
|
||||
var query = patch.Apply(new Query("system_guild").Where("system", system).Where("guild", guild));
|
||||
return _db.ExecuteQuery(query);
|
||||
return _db.ExecuteQuery(query, extraSql: "returning *");
|
||||
}
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@ namespace PluralKit.Core
|
||||
{
|
||||
_logger.Information("Updated {MemberId} in guild {GuildId}: {@MemberGuildPatch}", member, guild, patch);
|
||||
var query = patch.Apply(new Query("member_guild").Where("member", member).Where("guild", guild));
|
||||
return _db.ExecuteQuery(query);
|
||||
return _db.ExecuteQuery(query, extraSql: "returning *");
|
||||
}
|
||||
}
|
||||
}
|
@ -64,7 +64,7 @@ namespace PluralKit.Core
|
||||
{
|
||||
_logger.Information("Updated {MemberId}: {@MemberPatch}", id, patch);
|
||||
var query = patch.Apply(new Query("members").Where("id", id));
|
||||
return _db.QueryFirst<PKMember>(conn, query);
|
||||
return _db.QueryFirst<PKMember>(conn, query, extraSql: "returning *");
|
||||
}
|
||||
|
||||
public Task DeleteMember(MemberId id)
|
||||
|
Loading…
Reference in New Issue
Block a user