package cn.qg.qaplatform.controller.common;

import cn.qg.qaplatform.enums.Namespace;
import cn.qg.qaplatform.utils.EnumUtils;
import cn.qg.qaplatform.utils.JsonResult;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin
@RestController
public class NamespaceController {

    /**
     * 获取namespce列表
     */
    @GetMapping("/namespace/list")
    public JsonResult getAllNamespaceList() {
        return JsonResult.success(EnumUtils.enumToListMap(Namespace.class));
    }
}
