Skip to content

Commit

Permalink
Update API version from v1 to v2 across application (#265)
Browse files Browse the repository at this point in the history
* Update README.md

* Update useMetadata.js

* Update NavBar.js

* Update useFetch.js
  • Loading branch information
guibranco authored Sep 1, 2024
1 parent 3364e0b commit f8e2402
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
📝🏢 Aggregates open vacancies for developers based on more than 50 GitHub accounts for opportunities and some other sites.

- UI: [https://apibr.com/ui/vagas/](https://apibr.com/ui/vagas/)
- API (V1): [https://apibr.com/vagas/api/v1](https://apibr.com/vagas/api/v1)
- API (V2): [https://apibr.com/vagas/api/v1](https://apibr.com/vagas/api/v2)
- Swagger: [https://apibr.com/vagas/swagger](https://apibr.com/vagas/swagger)

![API BR - Vagas UI](ApiBrVagasUi.png)
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Layout/NavBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const NavBar = () => {
</ul>
</div>
<div>
<a href="https://apibr.com/vagas/swagger/" title="Swagger da API v1">
<a href="https://apibr.com/vagas/swagger/" title="Swagger da API v2">
<span className="badge bg-info"><i className="fa fa-code-fork"></i> Versão da API: {ApiMetadata.version}</span>
<br />
<span className="badge bg-info"><i className="fa fa-clock-o"></i> Data da API: {ApiMetadata.date}</span>
Expand Down
2 changes: 1 addition & 1 deletion src/Hooks/useFetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function reducer(state, action) {
}
}

const BASE_URL = "https://apibr.com/vagas/api/v1/";
const BASE_URL = "https://apibr.com/vagas/api/v2/";

export default function useFetch(entity, params, page) {
const [state, dispatch] = useReducer(reducer, {
Expand Down
4 changes: 2 additions & 2 deletions src/Hooks/useMetadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import toastr from "toastr";
import { useEffect, useState } from "react";
import FormatDate from "../Helpers/FormatDate";

const BASE_URL = "https://apibr.com/vagas/api/v1/";
const BASE_URL = "https://apibr.com/vagas/api/v2/";

export default function useMetadata() {
const [metadata, setMetadata] = useState({
Expand Down Expand Up @@ -31,4 +31,4 @@ export default function useMetadata() {
}, []);

return metadata;
}
}

0 comments on commit f8e2402

Please sign in to comment.