package com.kym.miniapp.controller;

import com.kym.common.R;
import com.kym.service.admin.ContactService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author skyline
 * @description
 * @date 2023-07-26 23:51
 */
@RestController
@RequestMapping("/common/")
public class CommonController {

    private final ContactService contactService;

    public CommonController(ContactService contactService) {
        this.contactService = contactService;
    }

    @GetMapping("/contact")
    R contact() {
        return R.success(contactService.list().stream().findFirst());
    }
}
