Commit c2e1651d authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

Erreurs dans commons.ts.twig.

parent ab705132
......@@ -264,7 +264,7 @@ export abstract class AbstractRepository<R extends Resource, T extends string, P
* Extrait les paramètres d'une IRI.
*/
public getIRIParameters(iri: IRI<R>): P {
return this.metadata.getIRIParameters(parameters);
return this.metadata.getIRIParameters(iri);
}
}
......@@ -388,13 +388,15 @@ export abstract class AbstractAPIService<
public get<T extends keyof API, R extends Resource = API[T]['resource']>(
typeOrIRI: T | IRI<R>,
parameters?: API[T]['iriParameters'], options?: RequestOptions
parametersOrOptions?: API[T]['iriParameters'] | RequestOptions,
options?: RequestOptions
): Observable<R> {
let iri: IRI<R>;
if (this.metadata.has(typeOrIRI as string)) {
iri = this.metadata.get(typeOrIRI as string).generateIRI(parameters);
iri = this.metadata.get(typeOrIRI as string).generateIRI(parametersOrOptions as API[T]['iriParameters']);
} else {
iri = typeOrIRI as IRI<R>;
options = parametersOrOptions as RequestOptions;
}
return this.cache.get(iri, () => this.client.get<R>(iri as any, options));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment