Skip to content

Conversation

@aayushgupta05
Copy link
Member

@aayushgupta05 aayushgupta05 commented Oct 5, 2020

Fixes #12
Included in this PR:

  • Fix Authentication Middleware
  • Encapsulate Chats array objects into a separate Message model (would help to reduce Dashboard fetch load and after messages can be load selectively on the basis of which topic is accessed)
  • Fix Mongoose schema and Graphql schema sync
  • Improve overall structure

Working after this:

  • Signup/Login
  • Category creation and fetching
  • Topic creation and fetching
  • Message creation and fetching (per topic)

@@ -1,4 +1,3 @@
MONGO_USER = "codeuino-user"
MONGO_PASSWORD = "thisisthewrongpassword"
DATABASE_URL="mongodb://<username>:<password>@cluster0-shard-00-00.t4hho.mongodb.net:27017,cluster0-shard-00-01.t4hho.mongodb.net:27017,cluster0-shard-00-02.t4hho.mongodb.net:27017/<dbname>?ssl=true&replicaSet=atlas-a80apd-shard-0&authSource=admin&retryWrites=true&w=majority"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to remove this URL as it will be different for every mongo cluster.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah! Basically it was just a placeholder to make it clear on what type of URL is expected

@aayushgupta05
Copy link
Member Author

@vaibhavdaren @capedcrusader23 @AuraOfDivinity please review and merge if all good

MONGO_PASSWORD = "thisisthewrongpassword"
DATABASE_URL="mongodb://<username>:<password>@cluster0-shard-00-00.t4hho.mongodb.net:27017,cluster0-shard-00-01.t4hho.mongodb.net:27017,cluster0-shard-00-02.t4hho.mongodb.net:27017/<dbname>?ssl=true&replicaSet=atlas-a80apd-shard-0&authSource=admin&retryWrites=true&w=majority"
JWT_SECRET = "somesupersecretkey"
PORT=8000
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
PORT=8000
PORT=8000

var bind = typeof port === 'string'
? 'Pipe ' + port
: 'Port ' + port;
var bind = typeof port === "string" ? "Pipe " + port : "Port " + port;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check

module.exports = {
messages: async (args, req) => {
if (!req.isAuth) {
throw new Error("Please login to continue");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

string in constants

@vaibhavdaren vaibhavdaren merged commit 06486db into codeuino:development Oct 10, 2020
@aayushgupta05 aayushgupta05 mentioned this pull request Oct 10, 2020
@aayushgupta05 aayushgupta05 deleted the cleanupCode branch October 12, 2020 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants