Openstatus www.openstatus.dev

๐Ÿ› notification

+8 -7
+8 -7
packages/api/src/router/notification.ts
··· 22 22 23 23 const notificationLimit = getLimit( 24 24 opts.ctx.workspace.plan, 25 - "notification-channels", 25 + "notification-channels" 26 26 ); 27 27 28 28 const notificationNumber = ( ··· 83 83 .where( 84 84 and( 85 85 eq(notification.id, opts.input.id), 86 - eq(notification.workspaceId, opts.ctx.workspace.id), 87 - ), 86 + eq(notification.workspaceId, opts.ctx.workspace.id) 87 + ) 88 88 ) 89 89 .returning() 90 90 .get(); ··· 98 98 .where( 99 99 and( 100 100 eq(notification.id, opts.input.id), 101 - eq(notification.id, opts.input.id), 102 - ), 101 + eq(notification.id, opts.input.id) 102 + ) 103 103 ) 104 104 .run(); 105 105 }), ··· 114 114 and( 115 115 eq(notification.id, opts.input.id), 116 116 eq(notification.id, opts.input.id), 117 - ), 117 + eq(notification.workspaceId, opts.ctx.workspace.id) 118 + ) 118 119 ) 119 120 .get(); 120 121 ··· 134 135 isNotificationLimitReached: protectedProcedure.query(async (opts) => { 135 136 const notificationLimit = getLimit( 136 137 opts.ctx.workspace.plan, 137 - "notification-channels", 138 + "notification-channels" 138 139 ); 139 140 const notificationNumbers = ( 140 141 await opts.ctx.db.query.notification.findMany({