Strapi refuse new posted data with api

Hello,

My job: collect user data and post strapi api. User can select tags or add new tags.

I have 2 functions:

  1. addNewTags: post new tags to strapi api then return all user tags for update.
  2. onSubmit: post data and return tags to strapi api.

Both function works well. But strapi refused just new tag data.

Can anyone give me tip ?

Thanks,

if (postedTags.new.length > 0) {
        await addNewTags(postedTags).then((saveTagIds) =>
          onSubmit({
            id: id,
            name: name,
            description: description,
            category: category,
            tags: saveTagIds,
          }).then((result) => {
            if (result.status == 200) {
              Router.push(`/member/collection/${result.data.id}`);
            }
          })
        );
      }
System Information
  • NextJS 11
  • Strapi 3.6.6:
  • Fedora 34:
  • MongoDB Atlas:
  • Node 14.17:
  • NPM 6.14.13:
  • Yarn 1.22.10: