Skip to content

Commit

Permalink
Create annonymousType variable and added it to postData dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
ssaigh committed Sep 23, 2024
1 parent a9278f9 commit b04590c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/posts/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ module.exports = function (Posts) {
const content = data.content.toString();
const timestamp = data.timestamp || Date.now();
const isMain = data.isMain || false;
const annonymousType = data.annonymousType;

Check failure on line 22 in src/posts/create.js

View workflow job for this annotation

GitHub Actions / test

Use object destructuring

Check failure on line 23 in src/posts/create.js

View workflow job for this annotation

GitHub Actions / test

Trailing spaces not allowed

if (!uid && parseInt(uid, 10) !== 0) {
throw new Error('[[error:invalid-uid]]');
Expand All @@ -35,6 +37,7 @@ module.exports = function (Posts) {
tid: tid,
content: content,
timestamp: timestamp,
annonymousType: annonymousType,
};

if (data.toPid) {
Expand Down

0 comments on commit b04590c

Please sign in to comment.