Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Standup endpoint #11

Closed
eddiejaoude opened this issue Jan 20, 2021 · 18 comments · Fixed by #54
Closed

Standup endpoint #11

eddiejaoude opened this issue Jan 20, 2021 · 18 comments · Fixed by #54

Comments

@eddiejaoude
Copy link
Member

eddiejaoude commented Jan 20, 2021

It would be great to encourage more daily standup information.

  • Save (from bot or UI) daily standup information
  • Read daily standup information in daily order desc

Update after discussion with @mstanciu552 below

send the information from EddieBot to the API using axios or fetch and then save them in a users collection in our db

@mstanciu552
Copy link

I have a question that would help with this. Specifically with the information from the discord bot.

How would we get the standup from it? Is it something from discord.js or do we need to use the Discord API?

@eddiejaoude
Copy link
Member Author

eddiejaoude commented Jan 20, 2021

We have a command ^standup <yesterday> || <today> it is nothing technically special, it just rewrites the message as a notifications.

I am suggesting we save this, so it could be displayed on our web app too

Example

Screenshot 2021-01-20 at 11 03 57

@mstanciu552
Copy link

Oh I see so we could just send the information from EddieBot to the API using axios or fetch and then save them in a users collection in our db.

Is thus the kind of system you are talking about?

@eddiejaoude
Copy link
Member Author

yes that is correct - sorry if I explained it badly, thank you for challenging 👍 - I will update the description

@mstanciu552
Copy link

Thanks for helping me to understand. 😄

@Vyvy-vi
Copy link
Member

Vyvy-vi commented Jan 20, 2021

I think, perhaps we could simplify this and avoid using discord API?
We could have the bot store this on Mongo and then the site could render the content from there?

@eddiejaoude
Copy link
Member Author

Yep 👍 the bot will send the data to our API which will store the data in the db

@mstanciu552
Copy link

This is a suggestion. If you think of anything better please let us know.

We could have a variable in the .env file that points to the URL of the API. Then using axios(or fetch) we make a request.

Then in the API we modify the User model to also have a standup array.

Please share your suggestions. 😄 👍

@eddiejaoude
Copy link
Member Author

Yep the API url in the Bot and UI will be part of the config, as this will change depending if we are developing locally or in production etc.

Yep, the User model will have a standup array 👍

@mstanciu552
Copy link

This question might be a bit redundand.

Does the ^standup command also send the user that called it?

@Vyvy-vi
Copy link
Member

Vyvy-vi commented Jan 21, 2021

It only sends the message in the channel it is called in

@mstanciu552
Copy link

Oh .... Do you also know if there is any way to get the sender through discord.js?

Something like message.from?

@Vyvy-vi
Copy link
Member

Vyvy-vi commented Jan 21, 2021

message.author should return the member object for the sender of the message

@mstanciu552
Copy link

Alright so I tested how to get the user.
Screenshot (89)
This will make an object with the id, username and discriminator(the # followed by 4 digits near the username).
We could create Users in the db based on this information, to which we add their standup array.(this could also have a date attached to it)

Share you opinions. It really help. Thank you. 👍 😄

@eddiejaoude
Copy link
Member Author

Nice 👍 , yes we will need to send the user with the standup message - so we can save the standup message against the user

Currently the Discord user API is being created, so we can move things to the API

@Cahllagerfeld
Copy link
Member

Cahllagerfeld commented Apr 13, 2021

I could do this.

  • I think we handle this like the discord-Service where data is stored in an Array until we have a database I'd suggest.
  • Do we need a Put-Endpoint for Editing Standups?

@eddiejaoude
Copy link
Member Author

Thanks @Cahllagerfeld 👍 . Good question, I do not think we need a PUT endpoint

eddiejaoude pushed a commit that referenced this issue Apr 17, 2021
* feat: ✨ Standup Module

Init Standup Module

* test: Update Unittest & Lint

* refactor: Remonve preneded I from interface

* test: E2E Testing Standupmodule

* test: Added new Step-definition

* refactor: Turn Search Endpoint to Get Request + Added Tests

* style: Consistent naming for Scenarios  + Blank Lines between Functions
eddiejaoude added a commit that referenced this issue Apr 17, 2021
eddiejaoude added a commit that referenced this issue Apr 17, 2021
@eddiejaoude
Copy link
Member Author

PR merged

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants