from django.views.decorators.http import require_http_methods

from backend.Service.ProductCategoryService import ProductCategoryService
from backend.Service.ProjectCategoryService import ProjectCategoryService


@require_http_methods(['POST'])
def Create(reqeust):
    return ProductCategoryService.Create(reqeust)


@require_http_methods(['POST'])
def Update(reqeust):
    return ProductCategoryService.Update(reqeust)


@require_http_methods(['POST'])
def Delete(reqeust):
    return ProductCategoryService.Delete(reqeust)


@require_http_methods(['POST'])
def Info(reqeust):
    return ProductCategoryService.Info(reqeust)


@require_http_methods(['POST'])
def Search(reqeust):
    return ProductCategoryService.Search(reqeust)


@require_http_methods(['POST'])
def All(reqeust):
    return ProductCategoryService.getAllCategories()
