integrateme-co / integrate-io Goto Github PK
View Code? Open in Web Editor NEWCross-Post your blogs between dev.to, Medium and Hashnode ๐
License: MIT License
Cross-Post your blogs between dev.to, Medium and Hashnode ๐
License: MIT License
Is your feature request related to a problem? Please describe.
Currently the platform (Dev.to, Medium or Hashnode) API keys are passed as it is to the server, which is a huge security issue.
Describe the solution you'd like
The platform API Keys should be encrypted before leaving the browser and be decrypted only when required
Add proper logging in all the Endpoints using pino-logger
Currently, there is no testing involved which makes the Maintenance of project difficult, Thus It is Desired To have Tests for the following Endpoints
api/v2/dev
api/v2/medium
api/v2/hash
Describe the bug
A clear and concise description of what the bug is.
If Wrong Dev URL is Given still it shows successful
{
"url": "https://dev.to/vovacodesca/building-custom-usetypedfetch-hook-in-react-with-typescript-mig",
"medium": true,
"hash": false,
"medium_userID": "15663e22a17ff2debaa043cd6f0816d",
"medium_token":"2615790a9d45d4ea9e2d67f81e2696",
"hash_token": "fee010ff-bd64b9"
}
Returns None encountered response although article is posted
There are no tags being associated with the schedules post.
Changes are to be made in services/publishArticle.js
2 or 1 Request per second
Is your feature request related to a problem? Please describe.
Currently, API Docs are present in README which is inconsistent and not well managed
Describe the solution you'd like
Implement the API docs using swagger
Is your feature request related to a problem? Please describe.
Automatically testing certain parts of the JavaScript logic
Describe the solution you'd like
Add jest as dev-dependency
I could take care of this and make a first example test.
http://localhost:8080/api/v2/medium
Does Not return a proper response even though the article is cross-posted on the other two platforms.
This arises due to poor error handling in controller/postFromMedium.controller.js
file
Mainly in the code snippet below
if(hashPost || mediumPost){
return res.status(201).json({"Message": "Blog Sucessfully Posted"});
}
Here i think hashPost
is not globally defined
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
Medium Cross posting API isn't working on custom medium domains like (username.medium.com
)
In All the endpoints API keys are passed on through the request's body which is not secure and efficient so it is desired to pass the API keys through headers.
Medium -> dev
But it not posting there and also no even in the drafts also
In the hashnode endpoint, the tags which are to be included in the post are hardcoded
tags: [
{
_id: "56744723958ef13879b9549b",
slug: article.slug,
name: "programmin, web-dev",
},
],
This is to be modified and tags are to be added as per original post
Currently, the slug in hashnode's endpoint is hardcoded due to GraphQL
const GET_ARTCILE = `{
post(slug: "beginners-guide-to-hacktoberfest-2021", hostname: ""){
title
content
}
}`
This results in posting only one post, it is desired to make the slug dynamic through hashURLParser
function
In services/cronjobs.js
add checks to verify if records
is empty or not
Is your feature request related to a problem? Please describe.
After a Successful cross-post
all APIs just returns
{
"Message": "Blog Successfully Posted"
}
But It would be better if they can also return the Draft URL of the article that is cross-posted
Use Prettier or any other linter and enable it globally for the whole repository
Describe the bug
api/v2/dev
isnt working in case of medium:true
mediumPost
at line 22 in postFromDevController.js
is undefined.
Problem is in postToMedium
function.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.