mirror of
https://github.com/docmost/docmost.git
synced 2025-11-14 02:21:16 +10:00
more work on attachments
* fix frontend env usage
This commit is contained in:
@ -13,8 +13,15 @@ import { sql } from 'kysely';
|
||||
export class WorkspaceRepo {
|
||||
constructor(@InjectKysely() private readonly db: KyselyDB) {}
|
||||
|
||||
async findById(workspaceId: string): Promise<Workspace> {
|
||||
return await this.db
|
||||
async findById(
|
||||
workspaceId: string,
|
||||
opts?: {
|
||||
trx?: KyselyTransaction;
|
||||
},
|
||||
): Promise<Workspace> {
|
||||
const db = dbOrTx(this.db, opts?.trx);
|
||||
|
||||
return db
|
||||
.selectFrom('workspaces')
|
||||
.selectAll()
|
||||
.where('id', '=', workspaceId)
|
||||
|
||||
Reference in New Issue
Block a user