{"size": 662, "ext": "js", "max_stars_repo_path": "functions/check_parameter.js", "max_stars_repo_name": "Team-Helper/ComgongBOT", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "functions/check_parameter.js", "max_issues_repo_name": "Team-Helper/ComgongBOT", "max_issues_repo_issues_event_min_datetime": "2021-11-24T07:55:25.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-30T00:54:13.000Z", "max_forks_repo_path": "functions/check_parameter.js", "max_forks_repo_name": "Team-Helper/ComgongBOT", "max_forks_repo_forks_event_min_datetime": "2022-01-26T05:17:20.000Z", "max_forks_repo_forks_event_max_datetime": "2022-01-26T05:17:20.000Z"}
{"max_stars_count": null, "max_issues_count": 46, "max_forks_count": 1, "avg_line_length": 34.8421052632, "max_line_length": 87, "alphanum_fraction": 0.5060422961}
const functions = require('firebase-functions');

exports.checkParameter = functions // 함수 이름
    .region('asia-northeast1')
    .https
    .onRequest(async (req, res) => {
        // console.log(req.body);
        const isNumber = parseInt(req.body.utterance); // 사용자가 입력한 학점 값
        console.log(isNumber);
        if (!isNaN(isNumber)) { // 숫자 타입인 경우
            res
                .status(200)
                .send({"status": "SUCCESS", "message": "this is a number"}); // 성공 전송
        } else { // 아닌 경우
            res
                .status(400)
                .send({"status": "FAIL", "message": "this is not a number!"}); // 실패 전송
        }
    });