mirror of
https://github.com/whekin/household-bot.git
synced 2026-03-31 22:34:03 +00:00
feat(miniapp): refine UI and add utility bill management
- Fix collapsible padding and button spacing - Add subtotal to balance card - Add utility bill management for admins - Fix lints and type checks across the monorepo - Implement rejectPendingHouseholdMember in repository and service
This commit is contained in:
@@ -1291,6 +1291,20 @@ export function createDbHouseholdConfigurationRepository(databaseUrl: string): {
|
||||
})
|
||||
},
|
||||
|
||||
async rejectPendingHouseholdMember(input) {
|
||||
const rows = await db
|
||||
.delete(schema.householdPendingMembers)
|
||||
.where(
|
||||
and(
|
||||
eq(schema.householdPendingMembers.householdId, input.householdId),
|
||||
eq(schema.householdPendingMembers.telegramUserId, input.telegramUserId)
|
||||
)
|
||||
)
|
||||
.returning({ telegramUserId: schema.householdPendingMembers.telegramUserId })
|
||||
|
||||
return rows.length > 0
|
||||
},
|
||||
|
||||
async updateHouseholdDefaultLocale(householdId, locale) {
|
||||
const updatedHouseholds = await db
|
||||
.update(schema.households)
|
||||
|
||||
Reference in New Issue
Block a user