prsima, grpc

This commit is contained in:
Gsk54
2022-12-13 18:00:07 +01:00
parent a4611b14ce
commit 48165e1d79
19 changed files with 792 additions and 51 deletions

View File

@@ -0,0 +1,18 @@
import { createMap, Mapper } from '@automapper/core';
import { AutomapperProfile, InjectMapper } from '@automapper/nestjs';
import { Injectable } from '@nestjs/common';
import { UserPresenter } from '../adapters/primaries/user.presenter';
import { User } from '../domain/entities/user';
@Injectable()
export class UserProfile extends AutomapperProfile {
constructor(@InjectMapper() mapper: Mapper) {
super(mapper);
}
override get profile() {
return (mapper) => {
createMap(mapper, User, UserPresenter);
};
}
}