Skip to content

Commit

Permalink
adapt config files
Browse files Browse the repository at this point in the history
  • Loading branch information
Vijeinath committed Apr 22, 2024
1 parent 37ad6d4 commit 2f1f85a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 23 deletions.
15 changes: 2 additions & 13 deletions src/app/app-init.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,9 @@ export class AppInitService {

this._knoraService.knoraApiConnection = AppInitService.settings.apiURL;

// console.log(AppInitService.settings, AppInitService.settings.email, AppInitService.settings.pwd);

this._knoraService.appLogin('[email protected]', 'test')
this._knoraService.appLogin(AppInitService.settings.email, AppInitService.settings.pwd)
.pipe(
mergeMap(() => this._knoraService.getAllLists('http://rdfh.ch/projects/0826')),
mergeMap(() => this._knoraService.getAllLists(AppInitService.settings.projectIRI)),
mergeMap((lists: ListNodeInfo[]) => forkJoin<Observable<List>>(lists.map((list: ListNodeInfo) => this._knoraService.getList(list.id))))
)
.subscribe((fullList: List[]) => {
Expand All @@ -70,13 +68,4 @@ export class AppInitService {
});
});
}

public gugus() {
console.log('GUGUS');
}

public gaga(): IAppConfig {
return AppInitService.settings;
}

}
3 changes: 2 additions & 1 deletion src/app/services/knora.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import {catchError, map} from 'rxjs/operators';
import {Observable, of, throwError} from 'rxjs';
import {DateValue} from '../edit/date-value/date-value.component';
import {DateCalendar} from '../classes/calendar';
import {AppInitService} from "../app-init.service";

//---- BEGIN LUKAS ---------------------------------------------------------------------------------------------------
export interface UserData {
Expand Down Expand Up @@ -660,7 +661,7 @@ export class KnoraService {
// EDITING BY LUKAS //----------------------------------------------------------------------------------------------

getAllLists2(): Observable<Array<ListData>> {
return this._knoraApiConnection.admin.listsEndpoint.getListsInProject('http://rdfh.ch/projects/0826').pipe(
return this._knoraApiConnection.admin.listsEndpoint.getListsInProject(AppInitService.settings.projectIRI).pipe(
map((res: ApiResponseData<ListsResponse>) => {
const result: Array<ListData> = [];
for (const list of res.body.lists) {
Expand Down
6 changes: 3 additions & 3 deletions src/config/config.dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"iiifURL": "http://0.0.0.0:1024",
"appURL": "http://localhost:4200",
"appName": "wordweb",
"email": "[email protected]",
"pwd": "test",
"projectIRI": "http://rdfh.ch/projects/0826"
"email": "[email protected]",
"pwd": "2bon2btitq",
"projectIRI": "http://rdfh.ch/projects/qhOve-cKTmSkiIU81W0lDQ"
}
12 changes: 6 additions & 6 deletions src/config/config.prod.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"env": {
"name": "prod"
},
"apiURL": "https://api.0826-test-server.dasch.swiss",
"iiifURL": "https://iiif.0826-test-server.dasch.swiss",
"appURL": "https://0826-test-server.dasch.swiss",
"apiURL": "https://api.dasch.swiss",
"iiifURL": "https://iiif.dasch.swiss",
"appURL": "https://app.dasch.swiss",
"appName": "wordweb",
"email": "[email protected]",
"pwd": "test",
"projectIRI": "http://rdfh.ch/projects/0826"
"email": "[email protected]",
"pwd": "2bon2btitq",
"projectIRI": "http://rdfh.ch/projects/qhOve-cKTmSkiIU81W0lDQ"
}

0 comments on commit 2f1f85a

Please sign in to comment.