From 21641cbc20b018f3ac73c5bd2a3012363aff1366 Mon Sep 17 00:00:00 2001 From: Trivernis Date: Tue, 7 Jan 2020 21:03:57 +0100 Subject: [PATCH] Fixed typo - changed deleteable to deletable --- CHANGELOG.md | 5 +---- src/graphql/schema.graphql | 2 +- src/lib/models/Post.ts | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8715cdf..eeffabb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/graphql/schema.graphql b/src/graphql/schema.graphql index c5307cd..4068f71 100644 --- a/src/graphql/schema.graphql +++ b/src/graphql/schema.graphql @@ -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" diff --git a/src/lib/models/Post.ts b/src/lib/models/Post.ts index d304e38..1b39243 100644 --- a/src/lib/models/Post.ts +++ b/src/lib/models/Post.ts @@ -101,7 +101,7 @@ export class Post extends Model { * Returns if the post can be deleted by the user with the given id. * @param userId */ - public async deleteable({userId}: {userId: number}): Promise { + public async deletable({userId}: {userId: number}): Promise { return Number(userId) === Number(this.authorId); } }