Merge branch 'julius-dev' of Software_Engineering_I/greenvironment-server into master

pull/5/head
Trivernis 5 years ago committed by Gitea
commit 0d562e0f88

@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Mocha Tests
- worker initialization error handling
- bearer token authentification for testing purposes
- Added `deletable' field on post
### Removed
@ -33,10 +34,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- graphql schema for denyRequest using the wrong parameters
- sendRequest allowing duplicates
### Added
- Added `deleteable' field on post
## [0.9] - 2019-10-29

@ -286,7 +286,7 @@ type Post {
userVote(userId: ID!): VoteType
"if the post can be deleted by the specified user"
deleteable(userId: ID!): Boolean
deletable(userId: ID!): Boolean
}
"represents a request of any type"

@ -101,7 +101,7 @@ export class Post extends Model<Post> {
* Returns if the post can be deleted by the user with the given id.
* @param userId
*/
public async deleteable({userId}: {userId: number}): Promise<boolean> {
public async deletable({userId}: {userId: number}): Promise<boolean> {
return Number(userId) === Number(this.authorId);
}
}

Loading…
Cancel
Save