Skip to content

Commit

Permalink
Correct method names
Browse files Browse the repository at this point in the history
  • Loading branch information
cdubz committed Jul 31, 2021
1 parent c873f84 commit 824d2af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/views.py
Expand Up @@ -327,7 +327,7 @@ class TimerRestart(PermissionRequired403Mixin, RedirectView):
http_method_names = ['post']
permission_required = ('core.change_timer',)

def get(self, request, *args, **kwargs):
def post(self, request, *args, **kwargs):
instance = models.Timer.objects.get(id=kwargs['pk'])
instance.restart()
messages.success(request, '{} restarted.'.format(instance))
Expand All @@ -342,7 +342,7 @@ class TimerStop(PermissionRequired403Mixin, SuccessMessageMixin, RedirectView):
permission_required = ('core.change_timer',)
success_message = _('%(timer)s stopped.')

def get(self, request, *args, **kwargs):
def post(self, request, *args, **kwargs):
instance = models.Timer.objects.get(id=kwargs['pk'])
instance.stop()
messages.success(request, '{} stopped.'.format(instance))
Expand Down

0 comments on commit 824d2af

Please sign in to comment.