Skip to content

Commit 011ffc4

Browse files
committed
tsc
1 parent 51c5512 commit 011ffc4

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

server/commands/accountProvisioner.ts

+1
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ async function provisionFirstCollection(team: Team, user: User) {
245245
document.content = await DocumentHelper.toJSON(document);
246246

247247
await document.publish(user, collection.id, {
248+
silent: true,
248249
transaction,
249250
});
250251
}

server/models/Document.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ class Document extends ParanoidModel<
361361
@BeforeSave
362362
static async updateCollectionStructure(
363363
model: Document,
364-
{ transaction }: SaveOptions<Document>
364+
{ transaction }: SaveOptions<InferAttributes<Document>>
365365
) {
366366
// templates, drafts, and archived documents don't appear in the structure
367367
// and so never need to be updated when the title changes
@@ -811,8 +811,8 @@ class Document extends ParanoidModel<
811811
publish = async (
812812
user: User,
813813
collectionId: string,
814-
options: SaveOptions<Document>
815-
) => {
814+
options: SaveOptions
815+
): Promise<this> => {
816816
const { transaction } = options;
817817

818818
// If the document is already published then calling publish should act like

server/models/Event.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ class Event extends IdModel<
7777
}
7878

7979
@AfterSave
80-
static async enqueue(model: Event, options: SaveOptions<Event>) {
80+
static async enqueue(
81+
model: Event,
82+
options: SaveOptions<InferAttributes<Event>>
83+
) {
8184
if (options.transaction) {
8285
options.transaction.afterCommit(() => void globalEventQueue.add(model));
8386
return;

server/models/Notification.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ class Notification extends Model<
177177
@AfterCreate
178178
static async createEvent(
179179
model: Notification,
180-
options: SaveOptions<Notification>
180+
options: SaveOptions<InferAttributes<Notification>>
181181
) {
182182
const params = {
183183
name: "notifications.create",

0 commit comments

Comments
 (0)