Skip to content

Commit cd0099f

Browse files
authored
perf: create view with share data (#1865)
1 parent 213ad68 commit cd0099f

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

apps/nestjs-backend/src/features/view/view.service.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,18 @@ export class ViewService implements IReadonlyAdapterService {
217217
const userId = this.cls.get('user.id');
218218
const createViewRo = await this.viewDataCompensation(tableId, viewRo);
219219

220-
const { description, type, options, sort, filter, group, columnMeta } = createViewRo;
220+
const {
221+
description,
222+
type,
223+
options,
224+
sort,
225+
filter,
226+
group,
227+
columnMeta,
228+
shareId,
229+
shareMeta,
230+
enableShare,
231+
} = createViewRo;
221232

222233
const { name, order } = await this.polishOrderAndName(tableId, createViewRo);
223234

@@ -246,6 +257,9 @@ export class ViewService implements IReadonlyAdapterService {
246257
order,
247258
createdBy: userId,
248259
columnMeta: mergedColumnMeta ? JSON.stringify(mergedColumnMeta) : JSON.stringify({}),
260+
shareId,
261+
shareMeta: shareMeta ? JSON.stringify(shareMeta) : undefined,
262+
enableShare,
249263
};
250264

251265
return await prisma.view.create({ data });

0 commit comments

Comments
 (0)