diff --git a/.idea/git_toolbox_prj.xml b/.idea/git_toolbox_prj.xml
new file mode 100644
index 0000000..02b915b
--- /dev/null
+++ b/.idea/git_toolbox_prj.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/services/vacancies/vacancies.service.ts b/app/services/vacancies/vacancies.service.ts
index 3be85b3..b20c13f 100644
--- a/app/services/vacancies/vacancies.service.ts
+++ b/app/services/vacancies/vacancies.service.ts
@@ -1,11 +1,14 @@
import { Vacancies, VacancyData } from '~/services/vacancies/vacancies.types'
export class VacanciesService {
+ baseUrl = 'https://vacancies-trends-api.onrender.com'
+
async getAll(): Promise {
- return await fetch('http://localhost:4321/vacancies').then(res => res.json())
+ return await fetch(`${this.baseUrl}/vacancies`).then(res => res.json())
}
+
async getAggregateByCreatedAt(): Promise {
- return await fetch('http://localhost:4321/vacancies/aggregated')
+ return await fetch(`${this.baseUrl}/vacancies/aggregated`)
.then(res => res.json())
.then(this.formatDateOnData)
}
@@ -14,7 +17,7 @@ export class VacanciesService {
return data.map(item => {
return {
...item,
- date: new Date(item.date).toLocaleTimeString('ru'),
+ date: new Date(item.date).toLocaleDateString('ru'),
}
})
}