common-cents-web/src/app/services/merchant.service.ts
2026-02-12 23:43:21 -06:00

20 lines
502 B
TypeScript

import { Injectable } from '@angular/core';
import { HttpService } from './http.service';
@Injectable({
providedIn: 'root',
})
export class MerchantService {
public static readonly MERCHANT_PATH = 'http://localhost:3000/common-cents/merchants';
public constructor(private readonly http: HttpService) { }
public async getMerchants(): Promise<Merchant[]> {
return this.http.get<Merchant[]>(MerchantService.MERCHANT_PATH);
}
}
export interface Merchant {
id: string;
name: string;
}