{"size": 434, "ext": "js", "max_stars_repo_path": "client/src/providers/auth.provider.js", "max_stars_repo_name": "taruuuch/project-viewer", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "client/src/providers/auth.provider.js", "max_issues_repo_name": "taruuuch/project-viewer", "max_issues_repo_issues_event_min_datetime": "2020-02-16T13:32:37.000Z", "max_issues_repo_issues_event_max_datetime": "2020-02-16T13:34:37.000Z", "max_forks_repo_path": "client/src/providers/auth.provider.js", "max_forks_repo_name": "taruuuch/project-viewer", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 25.5294117647, "max_line_length": 98, "alphanum_fraction": 0.7350230415}
import { apiProvider } from './api.provider'

const authUri = 'auth/login'
const registrationUri = 'auth/registration'

const createAuthProvider = () => {
  const login = async (credentials) => await apiProvider.post(authUri, credentials)
  const registration = async (credentials) => await apiProvider.post(registrationUri, credentials)

  return {
    login,
    registration
  }
}

export const authProvider = createAuthProvider()
