{"size": 636, "ext": "js", "max_stars_repo_path": "frontend/src/Utils/updateUser.js", "max_stars_repo_name": "iasmaro/GitLabAnalyzer", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "frontend/src/Utils/updateUser.js", "max_issues_repo_name": "iasmaro/GitLabAnalyzer", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "frontend/src/Utils/updateUser.js", "max_forks_repo_name": "iasmaro/GitLabAnalyzer", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.9090909091, "max_line_length": 107, "alphanum_fraction": 0.6006289308}
import { config } from 'Constants/constants';

const updateUser = async (username, token, gitlabServer, startDate, endDate, activeConfiguration = "") => {
    const URL = `${config.USERS_API_URL}`;

    const response = await fetch(URL, { 
        method: "PUT",
        headers: { "Content-type": "application/json"},
        body: JSON.stringify({
            gitlabServer: gitlabServer,
            personalAccessToken: token,
            userId: username,
            activeConfig: activeConfiguration,
            start: startDate,
            end: endDate,
        })
    });

    return response.ok;
}

export default updateUser;