Skip to content

Commit

Permalink
fix: remove create post limitaion (#799)
Browse files Browse the repository at this point in the history
  • Loading branch information
abdulhakim2902 committed Mar 2, 2023
1 parent de0ffed commit 5dab00c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
19 changes: 0 additions & 19 deletions src/__tests__/acceptance/post.acceptance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,25 +104,6 @@ describe('PostApplication', function () {
expect(result).to.containDeep(myriadPost);
});

it('reject creates a post in lite version when action is fulfilled', async () => {
await userRepository.updateById(user.id, {fullAccess: false});
for (let i = 0; i < 15; i++) {
await givenMyriadPostInstance(postRepository, {
createdBy: user.id.toString(),
platform: PlatformType.MYRIAD,
});
}
const myriadPost: Partial<DraftPost> = givenPost({
createdBy: user.id.toString(),
});
await client
.post('/user/posts')
.set('Authorization', `Bearer ${token}`)
.send(myriadPost)
.expect(422);
await userRepository.updateById(user.id, {fullAccess: true});
});

context('when dealing with a single persisted post', () => {
let persistedPost: PostWithRelations;

Expand Down
1 change: 0 additions & 1 deletion src/services/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,6 @@ export class UserService {
}

public async createPost(draftPost: DraftPost): Promise<DraftPost | Post> {
await this.haveFullAccess(ControllerType.POST);
draftPost.createdBy = this.currentUser[securityId];
return this.postService.create(draftPost);
}
Expand Down

0 comments on commit 5dab00c

Please sign in to comment.