-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1945 from ever-co/develop
Release
- Loading branch information
Showing
4 changed files
with
38 additions
and
16 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
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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
import { ILanguageItemList, CreateResponse, PaginationResponse } from '@app/interfaces'; | ||
import api from '../axios'; | ||
import { get } from '../axios'; | ||
|
||
export function getLanguageListAPI(is_system: boolean) { | ||
return api.get<CreateResponse<PaginationResponse<ILanguageItemList>>>(`/languages?is_system=${is_system}`); | ||
export async function getLanguageListAPI(is_system: boolean) { | ||
const endpoint = `/languages?is_system=${is_system}`; | ||
const data = await get(endpoint, true); | ||
|
||
return process.env.NEXT_PUBLIC_GAUZY_API_SERVER_URL ? data.data : data; | ||
} |