Skip to content

Instantly share code, notes, and snippets.

@NovoManu
Created August 18, 2019 16:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NovoManu/7b6cc62fe14658c66af619f2379a2bbf to your computer and use it in GitHub Desktop.
Save NovoManu/7b6cc62fe14658c66af619f2379a2bbf to your computer and use it in GitHub Desktop.
import axios from 'axios'
import { BaseApi } from '@/api/baseApi'
export class AxiosApi extends BaseApi {
constructor() {
super()
}
async fetch({ url }): Promise<any> {
const { data } = await axios.get(`${this.baseUrl}${url}`)
return data
}
}
@webmonger
Copy link

Hey, just going through you're post and noticed that the line @/api/baseApi should be @/api/BaseApi
Great tutorial!

@NovoManu
Copy link
Author

NovoManu commented Jan 20, 2020

Hi, thank you for the report!

I just checked the file and it is looking correct. https://github.com/NovoManu/SOLID-vue/tree/master/src/api

The file is written with camelCase. Are you talking about this file?

@webmonger
Copy link

Ah, I see.

I was creating files as I went through the post rather than pulling the repo. I was copying and pasting the file names from gist which are pascal case and the files in the repo are camel case.

@NovoManu
Copy link
Author

NovoManu commented Jan 20, 2020

Probably I have to check the article if it has some confusing things.
Anyway, thank you for the reply!

@webmonger
Copy link

No problem 👍

Article was very helpful and these issues were of minimal significance to the usefulness over all.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment