integrateme-co / integrate-io

Cross-Post your blogs between dev.to, Medium and Hashnode 🔀
MIT License
51 stars 15 forks source link

Article Object is Comming in an Array #20

Closed uzaxirr closed 3 years ago

uzaxirr commented 3 years ago

In controller/postFromMedium.controller.js the article object is coming as the 0th element of an array article

        if(dev) {
            Devblog = await postToDev(article[0], dev_api, "medium");
            if(!Devblog){
                return res.status(400).json({"Error": "Unable to publish to Dev.to From Medium"});
            }
        }

        if(hash){
            hashBlog = await postToHashnode(article[0], hash_api, "medium");
            if(!hashBlog){
                return res.status(400).json({"Error": "Unable to publish to Hashnode from Medium"});
            }
        }

Here as we can see 0th element of article array is being passed on

sanjaybaskaran01 commented 3 years ago

Hey! could you assign this task to me?

uzaxirr commented 3 years ago

Yea sure!!! Go Ahead

sanjaybaskaran01 commented 3 years ago

@uzair-ali10 Please do check PR