Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ks 2021 12 voting api #4067

Merged
merged 8 commits into from
Dec 17, 2021
Merged

Ks 2021 12 voting api #4067

merged 8 commits into from
Dec 17, 2021

Conversation

Rineee
Copy link
Contributor

@Rineee Rineee commented Dec 16, 2021

The permissions are not yet there, so this is currently only really working for logged in users with a valid token (for not logged in users, the deletion is not allowed).
Also the count of votes left is not there yet as I wanted to wait if updating of the proposal list will work/how it will work and then I would it add it to response.data of proposals serializer. Do you think that is a good solution @fuzzylogic2000 ?

@Kha to test, you need a valid token. You can go to django admin and create one for your module. The annoying thing is that in the list of modules you can choose from only the internal name of the modules are displayed. To find the right one, you can check under modules what the name is.
As you know, the re-rendering doesnt work yet and also I am using this helper fuction from livequestions, that we could maybe use, but then move to contrib or write our own?

My todo is:

  • permission to allow only five votes
  • delete permission should allow not logged in users
  • add number of votes in appropriate place
  • return proper response if api is called without token

I dont know if we want to merge this already and go on from there or keep on working in branches? Up to you :)

@Rineee Rineee force-pushed the ks-2021-12-voting-api branch from 426b049 to f2d5ce3 Compare December 16, 2021 09:29
@Rineee Rineee force-pushed the ks-2021-12-voting-api branch 2 times, most recently from b43fd89 to 15cba52 Compare December 16, 2021 10:03
@github-actions
Copy link

github-actions bot commented Dec 16, 2021

Coverage report

Total coverage

Status Category Percentage Covered / Total
🔴 Statements 9.7% 129/1330
🔴 Branches 7.89% 60/760
🔴 Functions 8.6% 38/442
🔴 Lines 17.19% 674/3921

Status of coverage: 🟢 - ok, 🟡 - slightly more than threshold, 🔴 - under the threshold

Report generated by 🧪jest coverage report action from d072700

@Rineee Rineee force-pushed the ks-2021-12-voting-api branch 2 times, most recently from ec05a1f to baf193c Compare December 16, 2021 17:28
@Rineee Rineee force-pushed the ks-2021-12-voting-api branch from 7fb19c8 to b63f3ec Compare December 17, 2021 13:59
@Rineee Rineee force-pushed the ks-2021-12-voting-api branch from b63f3ec to b57cce4 Compare December 17, 2021 14:03
@Rineee Rineee force-pushed the ks-2021-12-voting-api branch from b57cce4 to d072700 Compare December 17, 2021 14:36
Copy link
Contributor

@fuzzylogic2000 fuzzylogic2000 left a comment

Choose a reason for hiding this comment

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

Supercool!

@fuzzylogic2000 fuzzylogic2000 merged commit 3a9916b into main Dec 17, 2021
@fuzzylogic2000 fuzzylogic2000 deleted the ks-2021-12-voting-api branch December 17, 2021 14:39
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.

2 participants