mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-22 23:16:46 +00:00
fix(ci): message part types across the strict shared build, formatting and trip member write tests
This commit is contained in:
@@ -330,11 +330,7 @@ export function nameArgOf(tool: string, key: string, value: number, card: TripCa
|
||||
}
|
||||
|
||||
/** The reads an undo of `tool` makes before its check; none when its package asks for none or fails to say. */
|
||||
export function undoReadsOf(
|
||||
tool: string,
|
||||
args: ToolArgs,
|
||||
result: unknown,
|
||||
): UndoReads {
|
||||
export function undoReadsOf(tool: string, args: ToolArgs, result: unknown): UndoReads {
|
||||
return TOOL_CARDS[tool]?.undo?.reads?.(args, result) ?? [];
|
||||
}
|
||||
|
||||
|
||||
@@ -73,9 +73,7 @@ export class TripMemberWritesService {
|
||||
async deleteGuest(tripId: string | number, guestId: number, writer: TripWriter): Promise<boolean> {
|
||||
// Read first: the rows that name the guest go with the guest.
|
||||
const shared = (await this.budget.listBudgetItems(tripId))
|
||||
.filter(
|
||||
(item) => item.paid_by_user_id === guestId || item.members?.some((member) => member.user_id === guestId),
|
||||
)
|
||||
.filter((item) => item.paid_by_user_id === guestId || item.members?.some((member) => member.user_id === guestId))
|
||||
.map((item) => item.id);
|
||||
if (!(await this.roster.deleteGuest(tripId, guestId))) return false;
|
||||
writer.events.emit('member:removed', { userId: guestId });
|
||||
|
||||
Reference in New Issue
Block a user