"""
Created on Mar 16, 2016

@author: noob
"""

from common.util.clients import CacheClient
from django.http import HttpResponse
from django_yauth.decorators import yalogin_required
from json import dumps


@yalogin_required
def hide_notification(request):
    user = request.yauser
    cache = CacheClient()
    cache.set('do_not_notify_{}'.format(user.login), True)

    return HttpResponse(dumps([{'success': 1}]), content_type='application/json')
