-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Connecting tags when creating, filtering and editing log record (#203)
* initial changes * change edit log * change filter and update it to use id rather than name * small fixes and lint * reorder lines * remove tag status * remove tag status field
- Loading branch information
1 parent
137f173
commit 59f41e0
Showing
11 changed files
with
142 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { AxiosError } from "axios"; | ||
import AUTHENTICATED_USER_KEY from "../constants/AuthConstants"; | ||
import { getLocalStorageObjProperty } from "../utils/LocalStorageUtils"; | ||
import baseAPIClient from "./BaseAPIClient"; | ||
import { GetTagsResponse } from "../types/TagTypes"; | ||
|
||
const getTags = async (): Promise<GetTagsResponse> => { | ||
try { | ||
const bearerToken = `Bearer ${getLocalStorageObjProperty( | ||
AUTHENTICATED_USER_KEY, | ||
"accessToken", | ||
)}`; | ||
const { data } = await baseAPIClient.get<GetTagsResponse>(`/tags`, { | ||
headers: { Authorization: bearerToken }, | ||
}); | ||
return data; | ||
} catch (error) { | ||
return null; | ||
} | ||
}; | ||
|
||
export default { | ||
getTags, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.