Start new Node.js-based backend

This commit is contained in:
2020-05-26 16:07:52 +02:00
parent 27eb10d222
commit 7212f46191
16 changed files with 1200 additions and 43 deletions

View File

@ -1,9 +1,25 @@
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { RuntimeConfigLoaderService } from 'runtime-config-loader';
import { Entry } from './models/entry.model';
import { Observable } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class EntryServiceService {
constructor() { }
private api: string;
constructor(
private http: HttpClient,
private configSvc: RuntimeConfigLoaderService
) {
this.api = configSvc.getConfigObjectKey("api");
}
getEntries(): Observable<Array<Entry>> {
return null; // TODO
}
}

View File

@ -0,0 +1,12 @@
export class Entry {
constructor(singer_name: string, song: string, auth_cookie?: string) {
this.singer_name=singer_name;
this.song=song;
this.auth_cookie = auth_cookie;
}
singer_name: string;
song: string; //Actually the ID of the Song
auth_cookie?: string; //The "cookie" to authenticate for changing an entry. Null otherwise
}

View File

@ -35,6 +35,9 @@ export class SongSearchComponent implements OnInit {
).subscribe((filterValue: string) => {
this.updateSongs(filterValue);
});
//Für Testzwecke
this.updateSongs("Test");
}
}