-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1458 from undb-xyz/release/v0.7.2
- Loading branch information
Showing
132 changed files
with
3,914 additions
and
2,310 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
## v0.7.2 | ||
|
||
## v0.7.1 | ||
|
||
## v0.7.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
apps/backend/src/core/table/commands/set-form-field-filter.command.handler.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import type { ICommandHandler } from '@nestjs/cqrs' | ||
import { CommandHandler } from '@nestjs/cqrs' | ||
import { type ITableRepository } from '@undb/core' | ||
import { SetFormFieldFilterCommandHandler as DomainHandler, SetFormFieldFilterCommand } from '@undb/cqrs' | ||
import { InjectTableRepository } from '../adapters/sqlite/table-sqlite.repository.js' | ||
|
||
@CommandHandler(SetFormFieldFilterCommand) | ||
export class SetFormFieldFilterCommandHandler | ||
extends DomainHandler | ||
implements ICommandHandler<SetFormFieldFilterCommand, void> | ||
{ | ||
constructor( | ||
@InjectTableRepository() | ||
protected readonly tableRepo: ITableRepository, | ||
) { | ||
super(tableRepo) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Controller, Get, Param, Res } from '@nestjs/common' | ||
import { CommandBus } from '@nestjs/cqrs' | ||
import { AcceptInvitationCommand } from '@undb/cqrs' | ||
import { type IInvitationRepository } from '@undb/integrations' | ||
import { type Response } from 'express' | ||
import { InjectInvitationRepository } from './adapters/invitation-sqlite.repository.js' | ||
|
||
@Controller('invitations') | ||
export class InvitationController { | ||
constructor( | ||
private readonly commandBus: CommandBus, | ||
@InjectInvitationRepository() | ||
private readonly repo: IInvitationRepository, | ||
) {} | ||
|
||
@Get('/:id/accept') | ||
public async accept(@Res() res: Response, @Param('id') id: string) { | ||
const cmd = new AcceptInvitationCommand({ id }) | ||
await this.commandBus.execute(cmd) | ||
|
||
const invitation = (await this.repo.findOneById(id)).unwrap() | ||
|
||
res.redirect('/register?email=' + invitation.email.unpack()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
import { Module } from '@nestjs/common' | ||
import { CqrsModule } from '@nestjs/cqrs' | ||
import { UserModule } from '../core/user/user.module.js' | ||
import { adapters } from './adapters/index.js' | ||
import { commands } from './commands/index.js' | ||
import { InvitationMailService } from './invitation-mail.service.js' | ||
import { InvitationController } from './invitation.controller.js' | ||
import { NestInvitationService } from './invitation.service.js' | ||
import { queries } from './queries/index.js' | ||
import { sagas } from './sagas/index.js' | ||
|
||
@Module({ | ||
imports: [CqrsModule], | ||
imports: [CqrsModule, UserModule], | ||
controllers: [InvitationController], | ||
providers: [...commands, ...queries, ...sagas, ...adapters, NestInvitationService, InvitationMailService], | ||
}) | ||
export class InvitationModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.