mirror of
https://github.com/docmost/docmost.git
synced 2025-11-26 06:51:10 +10:00
more work on attachments
* fix frontend env usage
This commit is contained in:
@ -19,9 +19,10 @@ export class SpaceRepo {
|
||||
async findById(
|
||||
spaceId: string,
|
||||
workspaceId: string,
|
||||
opts?: { includeMemberCount: boolean },
|
||||
opts?: { includeMemberCount?: boolean; trx?: KyselyTransaction },
|
||||
): Promise<Space> {
|
||||
return await this.db
|
||||
const db = dbOrTx(this.db, opts?.trx);
|
||||
return db
|
||||
.selectFrom('spaces')
|
||||
.selectAll('spaces')
|
||||
.$if(opts?.includeMemberCount, (qb) => qb.select(this.withMemberCount))
|
||||
|
||||
Reference in New Issue
Block a user