Skip to content

Commit

Permalink
create with order start_point
Browse files Browse the repository at this point in the history
Co-authored-by: Joa0V  <[email protected]>
  • Loading branch information
pfc15 and Joa0V committed Sep 4, 2024
1 parent 190337a commit 74bb739
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/start_point/point.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,13 @@ export class PointService {
throw new UnauthorizedException('Invalid token');
}

const existent_array = this.findAll();


const newPoint = new this.pointModel({
...createStartPointDto,
user: userId,
order: (await existent_array).length,
});

const savedPoint = await newPoint.save();
Expand Down

0 comments on commit 74bb739

Please sign in to comment.