Closed ark-brighthustle closed 3 years ago
response:
{ "statusCode": 500, "error": "Internal Server Error", "message": "An internal server error occurred" }
request link:
http://localhost:1337/comments/videos:1
Parameter(json):
{ "authorUser": 1, "content": "My sample response", "threadOf": 2, "related": [{ "refId": 1, "ref": "videos", "field": "comments" }] }
Put and post for comment and videos has public access
and also created custom.js inside config with
module.exports = { plugins: { comments: { }, }, };
and added to model "video.settings.json"
"comments": { "plugin": "comments", "collection": "comment", "via": "related" } inside attributes
but when I send post request it shows error(500)
this is my package.json
{ "name": "api-education", "private": true, "version": "0.1.0", "description": "A Strapi application", "scripts": { "develop": "strapi develop", "start": "strapi start", "build": "strapi build", "strapi": "strapi" }, "dependencies": { "knex": "0.21.18", "sharp": "^0.29.0", "sqlite3": "5.0.0", "strapi": "3.6.8", "strapi-admin": "3.6.8", "strapi-connector-bookshelf": "3.6.8", "strapi-plugin-comments": "^1.0.2-beta.1", "strapi-plugin-content-manager": "3.6.8", "strapi-plugin-content-type-builder": "3.6.8", "strapi-plugin-documentation": "3.6.8", "strapi-plugin-email": "3.6.8", "strapi-plugin-email-designer": "^1.1.6", "strapi-plugin-i18n": "3.6.8", "strapi-plugin-oembed": "^0.4.0", "strapi-plugin-upload": "3.6.8", "strapi-plugin-users-permissions": "3.6.8", "strapi-utils": "3.6.8" }, "author": { "name": "A Strapi developer" }, "strapi": { "uuid": "2886efb5-8fe0-4f2e-9f82-359d604f2037" }, "engines": { "node": ">=10.16.0 <=14.x.x", "npm": "^6.0.0" }, "license": "MIT" }
@evilrat try please using video:1
instead of videos:1
or ref: 'video'
. Play with the values as Strapi auto produces stuff as singulars + plurals and it might be tricky.
Closing because lack of feedback from requester. Re-open please.
response:
{ "statusCode": 500, "error": "Internal Server Error", "message": "An internal server error occurred" }
request link:
http://localhost:1337/comments/videos:1
Parameter(json):
{ "authorUser": 1, "content": "My sample response", "threadOf": 2, "related": [{ "refId": 1, "ref": "videos", "field": "comments" }] }
Put and post for comment and videos has public access
and also created custom.js inside config with
module.exports = { plugins: { comments: { }, }, };
and added to model "video.settings.json"
"comments": { "plugin": "comments", "collection": "comment", "via": "related" } inside attributes
but when I send post request it shows error(500)