import { Injectable } from "@angular/core"; import { Api } from "./api"; import { Track } from "../../public-api"; @Injectable({ providedIn: 'root' }) export class TrackService { get route() { return this.api.base + 'track' } constructor(private api: Api) { } get() { return this.api.get(this.route + '/token') } getByID(id: string) { return this.api.get(this.route + id) } post(track: Track) { return this.api.post(this.route, track) } // put(track: Track) { // return this.api.put(this.route, track) // } // delete(track: Track) { // return this.api.delete(this.route + '/' + track._id); // } }