import axiosInstance from "@/apis/axios.config";

const PREFIX = "/api/behaviorRecord"

const bevaviorApis = {
    selectBehaviorRecord: (studentId: number, assignmentId :number) => {
        return axiosInstance.get(`${PREFIX}`, {
            params: {
                studentId,
                assignmentId
            }
        })
    },
    addBehaviorRecord: (assignmentId :number, file) => {
        const formData = new FormData();
        formData.append("assignmentId", assignmentId.toString())
        formData.append('file', file);
        return axiosInstance.post(`${PREFIX}`, formData, {
            headers: {
                'Content-Type': 'multipart/form-data'
            }
        })
    }
}

export default bevaviorApis;