Implement events for external use + Rename interfaces with a I prefix + add some documentation (#26)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Implement events for external use Rename interfaces with a I prefix Add some documentation Co-authored-by: Eric NGUYEN <enguyen@techform.fr> Reviewed-on: https://git.siklos-chaneru.duckdns.org/Siklos/svg-layout-designer-react/pulls/26
This commit is contained in:
parent
6c601429b9
commit
c81a6fe44b
38 changed files with 228 additions and 116 deletions
|
@ -1,10 +1,10 @@
|
|||
import { Configuration } from '../../Interfaces/Configuration';
|
||||
import { IConfiguration } from '../../Interfaces/IConfiguration';
|
||||
|
||||
/**
|
||||
* Fetch the configuration from the API
|
||||
* @returns {Configation} The model of the configuration for the application
|
||||
*/
|
||||
export async function fetchConfiguration(): Promise<Configuration> {
|
||||
export async function fetchConfiguration(): Promise<IConfiguration> {
|
||||
const url = `${import.meta.env.VITE_API_URL}`;
|
||||
// The test library cannot use the Fetch API
|
||||
// @ts-expect-error
|
||||
|
@ -15,7 +15,7 @@ export async function fetchConfiguration(): Promise<Configuration> {
|
|||
})
|
||||
.then(async(response) =>
|
||||
await response.json()
|
||||
) as Configuration;
|
||||
) as IConfiguration;
|
||||
}
|
||||
return await new Promise((resolve) => {
|
||||
const xhr = new XMLHttpRequest();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue