package com.zzsn.knowbase.controller;


import com.zzsn.knowbase.entity.KbPermissions;
import com.zzsn.knowbase.service.KbPermissionsService;
import com.zzsn.knowbase.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author obcy
 * @since 2024-01-04
 */
@RestController
@RequestMapping("/api/permissions")
public class KbPermissionsController {
    @Autowired
    KbPermissionsService permissionsService;

    @PostMapping("/add")
    public Result add(@RequestBody KbPermissions permission){
        return Result.OK(permissionsService.save(permission));
    }
}
