ajout de routes basiques, à améliorer (certaines requêtes renvoient une erreur interne et pas un 404), ajout du service pour les relations amicales, mais pour l'instant c'est ultra pété
This commit is contained in:
@@ -13,13 +13,16 @@ const app_service_1 = require("./app.service");
|
||||
const users_module_1 = require("./users/users.module");
|
||||
const typeorm_1 = require("@nestjs/typeorm");
|
||||
const config_1 = require("@nestjs/config");
|
||||
const friendshipstatuses_module_1 = require("./friendship/friendshipstatuses/friendshipstatuses.module");
|
||||
const friendship_controller_1 = require("./friendship/friendship/friendship.controller");
|
||||
const friendships_module_1 = require("./friendship/friendships.module");
|
||||
const core_1 = require("@nestjs/core");
|
||||
const routes_1 = require("./routes/routes");
|
||||
let AppModule = class AppModule {
|
||||
};
|
||||
AppModule = __decorate([
|
||||
(0, common_1.Module)({
|
||||
imports: [users_module_1.UsersModule,
|
||||
friendships_module_1.FriendshipsModule,
|
||||
core_1.RouterModule.register(routes_1.routesForUsers),
|
||||
config_1.ConfigModule.forRoot(),
|
||||
typeorm_1.TypeOrmModule.forRoot({
|
||||
type: 'postgres',
|
||||
@@ -31,10 +34,8 @@ AppModule = __decorate([
|
||||
autoLoadEntities: true,
|
||||
synchronize: true,
|
||||
}),
|
||||
friendshipstatuses_module_1.FriendshipstatusesModule,
|
||||
common_1.Module,
|
||||
],
|
||||
controllers: [app_controller_1.AppController, friendship_controller_1.FriendshipController],
|
||||
controllers: [app_controller_1.AppController],
|
||||
providers: [app_service_1.AppService],
|
||||
})
|
||||
], AppModule);
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,qDAAiD;AACjD,+CAA2C;AAC3C,uDAAmD;AACnD,6CAAgD;AAChD,2CAA8C;AAC9C,yGAAqG;AACrG,yFAAqF;AAyB9E,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,SAAS;IArBrB,IAAA,eAAM,EAAC;QACN,OAAO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AAO,CAAC,GAAG,CAAC,aAAa;gBACnC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB;gBACvC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB;gBACvC,gBAAgB,EAAE,IAAI;gBAGtB,WAAW,EAAE,IAAI;aACjB,CAAC;SACJ;QACC,WAAW,EAAE,CAAC,8BAAa,CAAC;QAC5B,SAAS,EAAE,CAAC,wBAAU,CAAC;KACxB,CAAC;GACW,SAAS,CAAG;AAAZ,8BAAS"}
|
||||
@@ -1,6 +1,6 @@
|
||||
import { FriendshipStatus } from '../entities/friendship.entity';
|
||||
export declare class CreateFriendshipDto {
|
||||
readonly requesterId: number;
|
||||
readonly addresseeId: number;
|
||||
readonly requesterId: string;
|
||||
readonly addresseeId: string;
|
||||
readonly status: FriendshipStatus;
|
||||
}
|
||||
|
||||
@@ -15,15 +15,16 @@ const friendship_entity_1 = require("../entities/friendship.entity");
|
||||
class CreateFriendshipDto {
|
||||
}
|
||||
__decorate([
|
||||
(0, class_validator_1.IsInt)(),
|
||||
__metadata("design:type", Number)
|
||||
(0, class_validator_1.IsString)(),
|
||||
__metadata("design:type", String)
|
||||
], CreateFriendshipDto.prototype, "requesterId", void 0);
|
||||
__decorate([
|
||||
(0, class_validator_1.IsInt)(),
|
||||
__metadata("design:type", Number)
|
||||
(0, class_validator_1.IsString)(),
|
||||
__metadata("design:type", String)
|
||||
], CreateFriendshipDto.prototype, "addresseeId", void 0);
|
||||
__decorate([
|
||||
(0, class_validator_1.IsEnum)(friendship_entity_1.FriendshipStatus),
|
||||
(0, class_validator_1.IsOptional)(),
|
||||
__metadata("design:type", String)
|
||||
], CreateFriendshipDto.prototype, "status", void 0);
|
||||
exports.CreateFriendshipDto = CreateFriendshipDto;
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"create-friendship.dto.js","sourceRoot":"","sources":["../../../src/friendship/dto/create-friendship.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAgD;AAChD,qEAAiE;AAEjE,MAAa,mBAAmB;CAO/B;AANA;IAAC,IAAA,uBAAK,GAAE;;wDACqB;AAC7B;IAAC,IAAA,uBAAK,GAAE;;wDACqB;AAC7B;IAAC,IAAA,wBAAM,EAAC,oCAAgB,CAAC;;mDACS;AANnC,kDAOC"}
|
||||
{"version":3,"file":"create-friendship.dto.js","sourceRoot":"","sources":["../../../src/friendship/dto/create-friendship.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA4F;AAC5F,qEAAiE;AAEjE,MAAa,mBAAmB;CAQ/B;AAPA;IAAC,IAAA,0BAAQ,GAAE;;wDACkB;AAC7B;IAAC,IAAA,0BAAQ,GAAE;;wDACkB;AAC7B;IAAC,IAAA,wBAAM,EAAC,oCAAgB,CAAC;IACxB,IAAA,4BAAU,GAAE;;mDACqB;AAPnC,kDAQC"}
|
||||
@@ -7,7 +7,7 @@ export declare enum FriendshipStatus {
|
||||
export declare class Friendship {
|
||||
id: number;
|
||||
date: Date;
|
||||
requesterId: number;
|
||||
addresseeId: number;
|
||||
requesterId: string;
|
||||
addresseeId: string;
|
||||
status: FriendshipStatus;
|
||||
}
|
||||
|
||||
@@ -32,12 +32,12 @@ __decorate([
|
||||
__decorate([
|
||||
(0, typeorm_1.Column)(),
|
||||
(0, typeorm_1.ManyToOne)(type => user_entity_1.User, user => user.requesterId),
|
||||
__metadata("design:type", Number)
|
||||
__metadata("design:type", String)
|
||||
], Friendship.prototype, "requesterId", void 0);
|
||||
__decorate([
|
||||
(0, typeorm_1.Column)(),
|
||||
(0, typeorm_1.ManyToOne)(type => user_entity_1.User, user => user.addresseeId),
|
||||
__metadata("design:type", Number)
|
||||
__metadata("design:type", String)
|
||||
], Friendship.prototype, "addresseeId", void 0);
|
||||
__decorate([
|
||||
(0, typeorm_1.Column)({ type: 'enum', enum: FriendshipStatus, default: FriendshipStatus.REQUESTED }),
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"friendship.entity.js","sourceRoot":"","sources":["../../../src/friendship/entities/friendship.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAwH;AACxH,kEAAwD;AAExD,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC3B,mCAAe,CAAA;IACf,kCAAc,CAAA;IACd,kCAAc,CAAA;IACd,iCAAa,CAAA;AACd,CAAC,EALW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAK3B;AAGM,IAAM,UAAU,GAAhB,MAAM,UAAU;CAiBtB,CAAA;AAhBA;IAAC,IAAA,gCAAsB,GAAE;;sCACd;AAEX;IAAC,IAAA,0BAAgB,GAAE;8BACZ,IAAI;wCAAC;AAEZ;IAAC,IAAA,gBAAM,GAAE;IACR,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAI,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC;;+CAC9B;AAEpB;IAAC,IAAA,gBAAM,GAAE;IACR,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAI,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC;;+CAC9B;AAEpB;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,gBAAgB,CAAC,SAAS,EAAE,CAAC;;0CAC7D;AAhBb,UAAU;IADtB,IAAA,gBAAM,EAAC,aAAa,CAAC;GACT,UAAU,CAiBtB;AAjBY,gCAAU"}
|
||||
{"version":3,"file":"friendship.entity.js","sourceRoot":"","sources":["../../../src/friendship/entities/friendship.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qCAAmI;AACnI,kEAAwD;AAExD,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC3B,mCAAe,CAAA;IACf,kCAAc,CAAA;IACd,kCAAc,CAAA;IACd,iCAAa,CAAA;AACd,CAAC,EALW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAK3B;AAGM,IAAM,UAAU,GAAhB,MAAM,UAAU;CAmBtB,CAAA;AAlBA;IAAC,IAAA,gCAAsB,GAAE;;sCACd;AAEX;IAAC,IAAA,0BAAgB,GAAE;8BACZ,IAAI;wCAAC;AAGZ;IAAC,IAAA,gBAAM,GAAE;IACR,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAI,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC;;+CAC9B;AAEpB;IAAC,IAAA,gBAAM,GAAE;IACR,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAI,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC;;+CAC9B;AAGpB;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,gBAAgB,CAAC,SAAS,EAAC,CAAC;;0CAC5D;AAlBb,UAAU;IADtB,IAAA,gBAAM,EAAC,aAAa,CAAC;GACT,UAAU,CAmBtB;AAnBY,gCAAU"}
|
||||
@@ -1,2 +1,15 @@
|
||||
import { CreateFriendshipDto } from './dto/create-friendship.dto';
|
||||
import { UpdateFriendshipDto } from './dto/update-friendship.dto';
|
||||
import { FriendshipService } from './friendship.service';
|
||||
export declare class FriendshipController {
|
||||
private readonly friendshipService;
|
||||
constructor(friendshipService: FriendshipService);
|
||||
findEmpty(userId: string): Promise<import("./entities/friendship.entity").Friendship[]>;
|
||||
findAllFriends(userId: string): Promise<import("./entities/friendship.entity").Friendship[]>;
|
||||
findAllBlocked(userId: string): Promise<import("./entities/friendship.entity").Friendship[]>;
|
||||
findAllPendant(userId: string): Promise<import("./entities/friendship.entity").Friendship[]>;
|
||||
findOneFriend(friendId: string): Promise<import("./entities/friendship.entity").Friendship[]>;
|
||||
create(createFriendshipDto: CreateFriendshipDto): Promise<import("./entities/friendship.entity").Friendship>;
|
||||
update(friendId: string, friendshipUpdateDto: UpdateFriendshipDto): Promise<import("./entities/friendship.entity").Friendship>;
|
||||
remove(friendId: string): Promise<import("./entities/friendship.entity").Friendship[]>;
|
||||
}
|
||||
|
||||
@@ -5,13 +5,108 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
||||
return function (target, key) { decorator(target, key, paramIndex); }
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.FriendshipController = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const create_friendship_dto_1 = require("./dto/create-friendship.dto");
|
||||
const update_friendship_dto_1 = require("./dto/update-friendship.dto");
|
||||
const friendship_service_1 = require("./friendship.service");
|
||||
let FriendshipController = class FriendshipController {
|
||||
constructor(friendshipService) {
|
||||
this.friendshipService = friendshipService;
|
||||
}
|
||||
findEmpty(userId) {
|
||||
return this.friendshipService.findAllFriends(userId);
|
||||
}
|
||||
findAllFriends(userId) {
|
||||
return this.friendshipService.findAllFriends(userId);
|
||||
}
|
||||
findAllBlocked(userId) {
|
||||
return this.friendshipService.findAllBlockedFriends(userId);
|
||||
}
|
||||
findAllPendant(userId) {
|
||||
return this.friendshipService.findAllPendantRequestsForFriendship(userId);
|
||||
}
|
||||
findOneFriend(friendId) {
|
||||
return this.friendshipService.findOneFriend(friendId);
|
||||
}
|
||||
create(createFriendshipDto) {
|
||||
return this.friendshipService.create(createFriendshipDto);
|
||||
}
|
||||
update(friendId, friendshipUpdateDto) {
|
||||
return this.friendshipService.updateFriendship(friendId, friendshipUpdateDto);
|
||||
}
|
||||
remove(friendId) {
|
||||
return this.friendshipService.removeFriendship(friendId);
|
||||
}
|
||||
};
|
||||
__decorate([
|
||||
(0, common_1.Get)(),
|
||||
__param(0, (0, common_1.Param)('userId')),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [String]),
|
||||
__metadata("design:returntype", void 0)
|
||||
], FriendshipController.prototype, "findEmpty", null);
|
||||
__decorate([
|
||||
(0, common_1.Get)('friends'),
|
||||
__param(0, (0, common_1.Param)('userId')),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [String]),
|
||||
__metadata("design:returntype", void 0)
|
||||
], FriendshipController.prototype, "findAllFriends", null);
|
||||
__decorate([
|
||||
(0, common_1.Get)('blocked'),
|
||||
__param(0, (0, common_1.Param)('userId')),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [String]),
|
||||
__metadata("design:returntype", void 0)
|
||||
], FriendshipController.prototype, "findAllBlocked", null);
|
||||
__decorate([
|
||||
(0, common_1.Get)('pendant'),
|
||||
__param(0, (0, common_1.Param)('userId')),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [String]),
|
||||
__metadata("design:returntype", void 0)
|
||||
], FriendshipController.prototype, "findAllPendant", null);
|
||||
__decorate([
|
||||
(0, common_1.Get)('friends/:friendId'),
|
||||
__param(0, (0, common_1.Param)('friendId')),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [String]),
|
||||
__metadata("design:returntype", void 0)
|
||||
], FriendshipController.prototype, "findOneFriend", null);
|
||||
__decorate([
|
||||
(0, common_1.Post)(),
|
||||
(0, common_1.HttpCode)(common_1.HttpStatus.CREATED),
|
||||
__param(0, (0, common_1.Body)()),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [create_friendship_dto_1.CreateFriendshipDto]),
|
||||
__metadata("design:returntype", void 0)
|
||||
], FriendshipController.prototype, "create", null);
|
||||
__decorate([
|
||||
(0, common_1.Patch)(':friendId'),
|
||||
__param(0, (0, common_1.Param)('friendId')),
|
||||
__param(1, (0, common_1.Body)()),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [String, update_friendship_dto_1.UpdateFriendshipDto]),
|
||||
__metadata("design:returntype", void 0)
|
||||
], FriendshipController.prototype, "update", null);
|
||||
__decorate([
|
||||
(0, common_1.Delete)(':userId/:friendId'),
|
||||
__param(0, (0, common_1.Param)('friendId')),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [String]),
|
||||
__metadata("design:returntype", void 0)
|
||||
], FriendshipController.prototype, "remove", null);
|
||||
FriendshipController = __decorate([
|
||||
(0, common_1.Controller)('friendship')
|
||||
(0, common_1.Controller)(),
|
||||
__metadata("design:paramtypes", [friendship_service_1.FriendshipService])
|
||||
], FriendshipController);
|
||||
exports.FriendshipController = FriendshipController;
|
||||
//# sourceMappingURL=friendship.controller.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"friendship.controller.js","sourceRoot":"","sources":["../../src/friendship/friendship.controller.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAGrC,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;CAAG,CAAA;AAAvB,oBAAoB;IADhC,IAAA,mBAAU,EAAC,YAAY,CAAC;GACZ,oBAAoB,CAAG;AAAvB,oDAAoB"}
|
||||
{"version":3,"file":"friendship.controller.js","sourceRoot":"","sources":["../../src/friendship/friendship.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAwH;AAExH,uEAAkE;AAClE,uEAAkE;AAElE,6DAAyD;AAGlD,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAChC,YAA6B,iBAAoC;QAApC,sBAAiB,GAAjB,iBAAiB,CAAmB;IAAG,CAAC;IAGrE,SAAS,CAAkB,MAAc;QACxC,OAAO,IAAI,CAAC,iBAAiB,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IACtD,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,EAAC,mBAAmB,CAAC;IACV,WAAA,IAAA,cAAK,EAAC,UAAU,CAAC,CAAA;;;;yDAE/B;AAED;IAAC,IAAA,aAAI,GAAE;IACN,IAAA,iBAAQ,EAAC,mBAAU,CAAC,OAAO,CAAC;IACrB,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAsB,2CAAmB;;kDAEtD;AAED;IAAC,IAAA,cAAK,EAAC,WAAW,CAAC;IACX,WAAA,IAAA,cAAK,EAAC,UAAU,CAAC,CAAA;IAAoB,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAsB,2CAAmB;;kDAE3F;AAED;IAAC,IAAA,eAAM,EAAC,mBAAmB,CAAC;IACpB,WAAA,IAAA,cAAK,EAAC,UAAU,CAAC,CAAA;;;;kDAExB;AAzCW,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAEoC,sCAAiB;GADrD,oBAAoB,CA0ChC;AA1CY,oDAAoB"}
|
||||
@@ -7,10 +7,12 @@ export declare class FriendshipService {
|
||||
private readonly friendshipRepository;
|
||||
private readonly userRepository;
|
||||
constructor(friendshipRepository: Repository<Friendship>, userRepository: Repository<User>);
|
||||
findOne(id: string): Promise<Friendship>;
|
||||
findOneFriend(id: string): Promise<Friendship[]>;
|
||||
findOneBlocked(id: string): Promise<Friendship[]>;
|
||||
findAllFriends(id: string): Promise<Friendship[]>;
|
||||
findAllBlockedFriends(id: string): Promise<Friendship[]>;
|
||||
create({ requesterId, addresseeId, status }: CreateFriendshipDto): Promise<Friendship>;
|
||||
findAllPendantRequestsForFriendship(id: string): Promise<Friendship[]>;
|
||||
create(createFriendshipDto: CreateFriendshipDto): Promise<Friendship>;
|
||||
updateFriendship(id: string, updateFriendshipDto: UpdateFriendshipDto): Promise<Friendship>;
|
||||
removeFriendship(id: string): Promise<Friendship>;
|
||||
removeFriendship(id: string): Promise<Friendship[]>;
|
||||
}
|
||||
|
||||
@@ -23,45 +23,62 @@ let FriendshipService = class FriendshipService {
|
||||
this.friendshipRepository = friendshipRepository;
|
||||
this.userRepository = userRepository;
|
||||
}
|
||||
async findOne(id) {
|
||||
const friendship = await this.friendshipRepository.findOneBy({ id: +id });
|
||||
async findOneFriend(id) {
|
||||
const friendship = await this.friendshipRepository.find({ where: { id: +id, status: friendship_entity_1.FriendshipStatus.ACCEPTED } });
|
||||
if (!friendship)
|
||||
throw new common_1.HttpException(`The requested friendship not found.`, common_1.HttpStatus.NOT_FOUND);
|
||||
throw new common_1.HttpException(`The requested friend not found.`, common_1.HttpStatus.NOT_FOUND);
|
||||
return friendship;
|
||||
}
|
||||
async findOneBlocked(id) {
|
||||
const friendship = await this.friendshipRepository.find({ where: { id: +id, status: friendship_entity_1.FriendshipStatus.BLOCKED } });
|
||||
if (!friendship)
|
||||
throw new common_1.HttpException(`The requested friend not found.`, common_1.HttpStatus.NOT_FOUND);
|
||||
return friendship;
|
||||
}
|
||||
async findAllFriends(id) {
|
||||
const user = await this.userRepository.findOneBy({ id: +id });
|
||||
if (!user)
|
||||
throw new common_1.HttpException(`The requested user not found.`, common_1.HttpStatus.NOT_FOUND);
|
||||
const friends = await this.friendshipRepository.find({ where: { requesterId: +id, status: friendship_entity_1.FriendshipStatus.ACCEPTED } });
|
||||
const friends = await this.friendshipRepository.find({ where: { requesterId: id, status: friendship_entity_1.FriendshipStatus.ACCEPTED } });
|
||||
return friends;
|
||||
}
|
||||
async findAllBlockedFriends(id) {
|
||||
const user = await this.userRepository.findOneBy({ id: +id });
|
||||
if (!user)
|
||||
throw new common_1.HttpException(`The requested user not found.`, common_1.HttpStatus.NOT_FOUND);
|
||||
const blocked = await this.friendshipRepository.find({ where: { requesterId: +id, status: friendship_entity_1.FriendshipStatus.BLOCKED } });
|
||||
const blocked = await this.friendshipRepository.find({ where: { requesterId: id, status: friendship_entity_1.FriendshipStatus.BLOCKED } });
|
||||
return blocked;
|
||||
}
|
||||
async create({ requesterId, addresseeId, status }) {
|
||||
const requester = await this.userRepository.findOneBy({ id: +requesterId });
|
||||
async findAllPendantRequestsForFriendship(id) {
|
||||
const user = await this.userRepository.findOneBy({ id: +id });
|
||||
if (!user)
|
||||
throw new common_1.HttpException(`The requested user not found.`, common_1.HttpStatus.NOT_FOUND);
|
||||
const blocked = await this.friendshipRepository.find({ where: { requesterId: id, status: friendship_entity_1.FriendshipStatus.REQUESTED } });
|
||||
return blocked;
|
||||
}
|
||||
async create(createFriendshipDto) {
|
||||
const requester = await this.userRepository.findOneBy({ id: +createFriendshipDto.requesterId });
|
||||
if (!requester)
|
||||
throw new common_1.HttpException(`The user does not exist.`, common_1.HttpStatus.NOT_FOUND);
|
||||
const addressee = await this.userRepository.findOneBy({ id: +addresseeId });
|
||||
const addressee = await this.userRepository.findOneBy({ id: +createFriendshipDto.addresseeId });
|
||||
if (!addressee)
|
||||
throw new common_1.HttpException(`The user does not exist.`, common_1.HttpStatus.NOT_FOUND);
|
||||
if (requesterId == addresseeId)
|
||||
if (createFriendshipDto.requesterId == createFriendshipDto.addresseeId)
|
||||
throw new common_1.HttpException(`You can't add yourself.`, common_1.HttpStatus.NOT_FOUND);
|
||||
const friendship = this.friendshipRepository.findOneBy({ requesterId: +requesterId, addresseeId: +addresseeId });
|
||||
if ((await friendship).status === 'R')
|
||||
throw new common_1.HttpException(`The friendship request has already been sent the ${(await friendship).date}.`, common_1.HttpStatus.OK);
|
||||
if ((await friendship).status === 'A')
|
||||
throw new common_1.HttpException(`The friendship request has already been accepted.`, common_1.HttpStatus.OK);
|
||||
if ((await friendship).status === 'D')
|
||||
throw new common_1.HttpException(``, common_1.HttpStatus.OK);
|
||||
if ((await friendship).status === 'B')
|
||||
throw new common_1.HttpException(`The user does not exist.`, common_1.HttpStatus.OK);
|
||||
const newFriendship = this.friendshipRepository.create({ requesterId: +requesterId, addresseeId: +addresseeId, status: status });
|
||||
const friendship = await this.friendshipRepository.findOneBy({ requesterId: createFriendshipDto.requesterId, addresseeId: createFriendshipDto.addresseeId });
|
||||
if (friendship) {
|
||||
if (friendship.status && friendship.status === friendship_entity_1.FriendshipStatus.ACCEPTED)
|
||||
throw new common_1.HttpException(`The friendship request has already been accepted.`, common_1.HttpStatus.OK);
|
||||
else if (friendship.status && friendship.status === friendship_entity_1.FriendshipStatus.REQUESTED)
|
||||
throw new common_1.HttpException(`The friendship request has already been sent the ${friendship.date}.`, common_1.HttpStatus.OK);
|
||||
else if (friendship.status && friendship.status === friendship_entity_1.FriendshipStatus.BLOCKED)
|
||||
throw new common_1.HttpException(``, common_1.HttpStatus.OK);
|
||||
else if (friendship.status && friendship.status === friendship_entity_1.FriendshipStatus.DECLINED)
|
||||
throw new common_1.HttpException(`The request has been declined.`, common_1.HttpStatus.OK);
|
||||
}
|
||||
const newFriendship = this.friendshipRepository.create({ requesterId: createFriendshipDto.requesterId, addresseeId: createFriendshipDto.addresseeId, status: friendship_entity_1.FriendshipStatus.REQUESTED });
|
||||
const sendrquest = this.friendshipRepository.create({ requesterId: createFriendshipDto.requesterId, addresseeId: createFriendshipDto.addresseeId, status: friendship_entity_1.FriendshipStatus.REQUESTED });
|
||||
this.friendshipRepository.save(sendrquest);
|
||||
return this.friendshipRepository.save(newFriendship);
|
||||
}
|
||||
async updateFriendship(id, updateFriendshipDto) {
|
||||
@@ -71,7 +88,7 @@ let FriendshipService = class FriendshipService {
|
||||
return this.friendshipRepository.save(friendship);
|
||||
}
|
||||
async removeFriendship(id) {
|
||||
const friendship = await this.findOne(id);
|
||||
const friendship = await this.findOneFriend(id);
|
||||
if (!friendship)
|
||||
throw new common_1.HttpException(`Your friend could not be deleted.`, common_1.HttpStatus.NOT_FOUND);
|
||||
return this.friendshipRepository.remove(friendship);
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"friendship.service.js","sourceRoot":"","sources":["../../src/friendship/friendship.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAuE;AACvE,6CAAmD;AACnD,+DAAsD;AACtD,qCAAqC;AAGrC,oEAA4E;AAGrE,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAE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CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,EAAU;QAChC,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;QAChD,IAAI,CAAC,UAAU;YACd,MAAM,IAAI,sBAAa,CAAC,mCAAmC,EAAC,mBAAU,CAAC,SAAS,CAAC,CAAC;QACnF,OAAO,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IACrD,CAAC;CACD,CAAA;AA9FY,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;IAIV,WAAA,IAAA,0BAAgB,EAAC,8BAAU,CAAC,CAAA;IAE5B,WAAA,IAAA,0BAAgB,EAAC,kBAAI,CAAC,CAAA;qCADgB,oBAAU;QAEhB,oBAAU;GANhC,iBAAiB,CA8F7B;AA9FY,8CAAiB"}
|
||||
2
srcs/requirements/nestjs/api_back/dist/routes/routes.d.ts
vendored
Normal file
2
srcs/requirements/nestjs/api_back/dist/routes/routes.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { Routes } from "@nestjs/core";
|
||||
export declare const routesForUsers: Routes;
|
||||
18
srcs/requirements/nestjs/api_back/dist/routes/routes.js
vendored
Normal file
18
srcs/requirements/nestjs/api_back/dist/routes/routes.js
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.routesForUsers = void 0;
|
||||
const friendships_module_1 = require("../friendship/friendships.module");
|
||||
const users_module_1 = require("../users/users.module");
|
||||
exports.routesForUsers = [
|
||||
{
|
||||
path: '/users',
|
||||
module: users_module_1.UsersModule,
|
||||
children: [
|
||||
{
|
||||
path: '/:userId/mycontacts',
|
||||
module: friendships_module_1.FriendshipsModule,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
//# sourceMappingURL=routes.js.map
|
||||
1
srcs/requirements/nestjs/api_back/dist/routes/routes.js.map
vendored
Normal file
1
srcs/requirements/nestjs/api_back/dist/routes/routes.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../src/routes/routes.ts"],"names":[],"mappings":";;;AACA,yEAAsE;AACtE,wDAAqD;AAExC,QAAA,cAAc,GAAW;IACrC;QACC,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,0BAAW;QACnB,QAAQ,EAAE;YACT;gBACC,IAAI,EAAE,qBAAqB;gBAC3B,MAAM,EAAE,sCAAiB;aACzB;SACD;KACD;CACD,CAAC"}
|
||||
File diff suppressed because one or more lines are too long
@@ -8,4 +8,5 @@ export declare class User {
|
||||
status: [string];
|
||||
requesterId: Friendship[];
|
||||
addresseeId: Friendship[];
|
||||
friendships: Friendship[];
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"user.entity.js","sourceRoot":"","sources":["../../../src/users/entities/user.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qCAA2G;AAC3G,mFAAyE;AAIlE,IAAM,IAAI,GAAV,MAAM,IAAI;CA8BhB,CAAA;AA5BA;IAAC,IAAA,gCAAsB,GAAE;;gCACd;AAEX;IAAC,IAAA,gBAAM,GAAE;;kCACI;AAEb;IAAC,IAAA,gBAAM,GAAE;;sCACQ;AAGjB;IAAC,IAAA,gBAAM,GAAE;;mCACK;AAId;IAAC,IAAA,gBAAM,GAAE;;sCACQ;AAEjB;IAAC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oCAClB;AAEjB;IAAC,IAAA,mBAAS,GAAE;IACX,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,8BAAU,EAAG,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;;yCAC7C;AAE1B;IAAC,IAAA,mBAAS,GAAE;IACX,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,8BAAU,EAAG,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;;yCAC7C;AA7Bd,IAAI;IADhB,IAAA,gBAAM,EAAC,OAAO,CAAC;GACH,IAAI,CA8BhB;AA9BY,oBAAI"}
|
||||
{"version":3,"file":"user.entity.js","sourceRoot":"","sources":["../../../src/users/entities/user.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qCAA2G;AAC3G,mFAAyE;AAIlE,IAAM,IAAI,GAAV,MAAM,IAAI;CAgChB,CAAA;AA9BA;IAAC,IAAA,gCAAsB,GAAE;;gCACd;AAEX;IAAC,IAAA,gBAAM,GAAE;;kCACI;AAEb;IAAC,IAAA,gBAAM,GAAE;;sCACQ;AAGjB;IAAC,IAAA,gBAAM,GAAE;;mCACK;AAId;IAAC,IAAA,gBAAM,GAAE;;sCACQ;AAEjB;IAAC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oCAClB;AAEjB;IAAC,IAAA,mBAAS,GAAE;IACX,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,8BAAU,EAAG,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;;yCAC7C;AAE1B;IAAC,IAAA,mBAAS,GAAE;IACX,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,8BAAU,EAAG,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;;yCAC7C;AA7Bd,IAAI;IADhB,IAAA,gBAAM,EAAC,OAAO,CAAC;GACH,IAAI,CAgChB;AAhCY,oBAAI"}
|
||||
@@ -38,7 +38,7 @@ let UsersController = class UsersController {
|
||||
}
|
||||
};
|
||||
__decorate([
|
||||
(0, common_1.Get)(),
|
||||
(0, common_1.Get)('all'),
|
||||
__param(0, (0, common_1.Query)()),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Object]),
|
||||
@@ -75,7 +75,7 @@ __decorate([
|
||||
__metadata("design:returntype", void 0)
|
||||
], UsersController.prototype, "remove", null);
|
||||
UsersController = __decorate([
|
||||
(0, common_1.Controller)('users'),
|
||||
(0, common_1.Controller)('/'),
|
||||
__metadata("design:paramtypes", [users_service_1.UsersService])
|
||||
], UsersController);
|
||||
exports.UsersController = UsersController;
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"users.controller.js","sourceRoot":"","sources":["../../src/users/users.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAGwB;AACxB,6DAAwD;AACxD,6DAAwD;AAExD,mDAA+C;AAIxC,IAAM,eAAe,GAArB,MAAM,eAAe;IAC3B,YAA6B,YAA0B;QAA1B,iBAAY,GAAZ,YAAY,CAAc;IAAG,CAAC;IAG3D,OAAO,CAAU,KAAK;QAErB,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;IACpC,CAAC;IAGD,OAAO,CAAc,EAAU;QAC9B,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACtC,CAAC;IAID,MAAM,CAAS,cAA+B;QAC7C,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACjD,CAAC;IAGD,MAAM,CAAc,EAAU,EAAU,cAA8B;QACrE,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC;IACrD,CAAC;IAGD,MAAM,CAAc,EAAU;QAC7B,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACrC,CAAC;CACD,CAAA;AA1BA;IAAC,IAAA,YAAG,GAAE;IACG,WAAA,IAAA,cAAK,GAAE,CAAA;;;;8CAGf;AAED;IAAC,IAAA,YAAG,EAAC,KAAK,CAAC;IACF,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;8CAEnB;AAED;IAAC,IAAA,aAAI,GAAE;IACN,IAAA,iBAAQ,EAAC,mB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AA1BA;IAAC,IAAA,YAAG,EAAC,KAAK,CAAC;IACF,WAAA,IAAA,cAAK,GAAE,CAAA;;;;8CAGf;AAED;IAAC,IAAA,YAAG,EAAC,KAAK,CAAC;IACF,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;8CAEnB;AAED;IAAC,IAAA,aAAI,GAAE;IACN,IAAA,iBAAQ,EAAC,mBAAU,CAAC,IAAI,CAAC;IAClB,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAkB,iCAAc;;6CAE7C;AAED;IAAC,IAAA,cAAK,EAAC,KAAK,CAAC;IACL,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;IAAc,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAiB,iCAAc;;6CAErE;AAED;IAAC,IAAA,eAAM,EAAC,KAAK,CAAC;IACN,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;6CAElB;AA7BW,eAAe;IAD3B,IAAA,mBAAU,EAAC,GAAG,CAAC;qCAE4B,4BAAY;GAD3C,eAAe,CA8B3B;AA9BY,0CAAe"}
|
||||
@@ -18,12 +18,15 @@ const typeorm_1 = require("@nestjs/typeorm");
|
||||
const user_entity_1 = require("./entities/user.entity");
|
||||
const typeorm_2 = require("typeorm");
|
||||
const friendship_entity_1 = require("../friendship/entities/friendship.entity");
|
||||
const class_validator_1 = require("class-validator");
|
||||
let UsersService = class UsersService {
|
||||
constructor(userRepository, friendshipRepository) {
|
||||
this.userRepository = userRepository;
|
||||
this.friendshipRepository = friendshipRepository;
|
||||
}
|
||||
async findOne(id) {
|
||||
if (!(0, class_validator_1.isNumberString)(id))
|
||||
throw new common_1.HttpException(`The requested user not found.`, common_1.HttpStatus.NOT_FOUND);
|
||||
const user = await this.userRepository.findOneBy({ id: +id });
|
||||
if (!user)
|
||||
throw new common_1.NotFoundException(`The requested user not found.`);
|
||||
@@ -32,7 +35,9 @@ let UsersService = class UsersService {
|
||||
findAll() {
|
||||
return this.userRepository.find();
|
||||
}
|
||||
create(createUserDto) {
|
||||
async create(createUserDto) {
|
||||
if (await this.userRepository.findOneBy({ email: createUserDto.email }))
|
||||
throw new common_1.HttpException(`The user already exists.`, common_1.HttpStatus.CONFLICT);
|
||||
const user = this.userRepository.create(createUserDto);
|
||||
if (!user)
|
||||
throw new common_1.HttpException(`The user could not be created.`, common_1.HttpStatus.NOT_FOUND);
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"users.service.js","sourceRoot":"","sources":["../../src/users/users.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAsG;AACtG,6CAAmD;AAEnD,wDAA8C;AAC9C,qCAAqC;AAGrC,gFAAsE;AAI/D,IAAM,YAAY,GAAlB,MAAM,YAAY;IAExB,YAEiB,cAAgC,EAEhC,oBAA4C;QAF5C,mBAAc,GAAd,cAAc,CAAkB;QAEhC,yBAAoB,GAApB,oBAAoB,CAAwB;IAC1D,CAAC;IAEJ,KAAK,CAAC,OAAO,CAAC,EAAU;QACvB,MAAM,IAAI,GAAI,MAAM,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,EAAC,EAAE,EAAE,CAAC,EAAE,EAAC,CAAC,CAAC;QAC7D,IAAI,CAAC,IAAI;YACR,MAAM,IAAI,0BAAiB,CAAC,+BAA+B,CAAC,CAAC;QAC9D,OAAO,IAAI,CAAC;IACb,CAAC;IAED,OAAO;QACN,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,aAA6B;QACnC,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QACvD,IAAI,CAAC,IAAI;YACR,MAAM,IAAI,sBAAa,CAAC,gCAAgC,EAAC,mBAAU,CAAC,SAAS,CAAC,CAAC;QAChF,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IAED,KAAK,CAAC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