You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added ChatMessage schema & fixed api logic so it actually stores each chatMessage in the db (#1822)
* added ChatMessage schema & modified writeMessage function to write to mongodb
* modified /getLatestmessage to get the latest message, need to test it out in postman now
* updated writeMessage to be async for proper mongoDB chatMessage creation
* getLatestMessage now works for specific chatRoom ids, gets the userid via querying the User database by username and then extracting the userId
* uncommented out some token and apikey logic
* fixed lint errors yay
* reverted the package-lock.json file to the one from dev branch
* removed all the random styling changes, kept only the logic changes
* changed from expiresAt to expireAt and added TTL index for automatic expiration
* made writing to mongoDb as a seperate function
* removed the extracting username logic from writeMessage.
* fixed lint errors
* removed writeToMongo function, just added it inside the /send route
* Fixed lint errors
0 commit comments