import axios from 'axios'

// Config
import { baseURL } from '../../../Config'

export const getGameByResourcesId = async (resourcesId: string) => {
  try {
    const { data } = await axios.get(baseURL + '/games/levelBy/' + resourcesId)
    return data
  } catch (error) {
    console.error(error)
  }
}

export const getUserById = async (userId: string | null) => {
  try {
    const { data } = await axios.get(baseURL + '/users/' + userId)
    return data
  } catch (error) {
    console.error(error)
  }
}

// export const getUnlockGameByResourcesId = async (resourcesId: string) => {
//   try {
//     const { data } = await axios.get(baseURL + '/games//' + resourcesId)
//     return data
//   } catch (error) {
//     console.error(error)
//   }
// }

// export const getLockGameByResourcesId = async (resourcesId: string) => {
//   try {
//     const { data } = await axios.get(baseURL + '/games///' + resourcesId)
//     return data
//   } catch (error) {
//     console.error(error)
//   }
// }
