Compare commits

..

No commits in common. "7b948f0380e6cc8e3d4a8b2ef54ffa34931d7f07" and "3a84cc8ef56c20fce74707f0aa9df7f120ee693e" have entirely different histories.

View File

@ -8,23 +8,17 @@ import {
Delete,
} from "routing-controllers";
import { OpenAPI } from "routing-controllers-openapi";
import { getConnection, Repository } from "typeorm";
import { Track } from "../models/Track";
@JsonController("/track")
@JsonController()
export class TrackController {
private repo(): Repository<Track> {
return getConnection().getRepository(Track);
}
@Get("/track")
async getAll() {
return await this.repo().find();
getAll() {
return "This action returns all users";
}
@Get("/track/:id")
async getOne(@Param("id") id: number) {
return await this.repo().findOne({ id: id });
getOne(@Param("id") id: number) {
return "This action returns user #" + id;
}
@Post("/track")