embalse individual

This commit is contained in:
2024-10-17 19:30:18 +02:00
parent 1e6c9c7fb2
commit 6ca280469d
9 changed files with 144 additions and 13 deletions

View File

@ -7,6 +7,10 @@ export default class Api {
return Api._makeReq('/embalses');
}
static async embalseById(id: string): Promise<Embalse[]> {
return Api._makeReq(`/embalses/${id}`);
}
static async _makeReq<T>(endpoint: string): Promise<T[]> {
let hasMore = true;