mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
save
This commit is contained in:
@@ -9,6 +9,7 @@ import { Storage } from '@ionic/storage';
|
||||
import { Message } from 'src/app/models/message.model';
|
||||
import { Observable, Subject } from "rxjs/Rx";
|
||||
import { WebsocketService } from './websocket.service';
|
||||
import { FileService } from './functions/file.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -31,6 +32,7 @@ export class ChatService {
|
||||
private authService: AuthService,
|
||||
private storage: Storage,
|
||||
private storageService:StorageService,
|
||||
private fileService: FileService,
|
||||
//private wsService: WebsocketService,
|
||||
)
|
||||
{
|
||||
@@ -49,6 +51,22 @@ export class ChatService {
|
||||
}); */
|
||||
}
|
||||
|
||||
getDocumentDetails(url:string){
|
||||
let headersc = new HttpHeaders();
|
||||
headersc = headersc.set('X-User-Id', this.loggedUserChat['data'].userId);
|
||||
headersc = headersc.set('X-Auth-Token', this.loggedUserChat['data'].authToken);
|
||||
// headersc = headersc.set("Host", "www.tabularium.pt");
|
||||
// headersc = headersc.set("Origin", "http://localhost:8100");
|
||||
// headersc = headersc.set("Referer", "http://localhost:8100/");
|
||||
let optionsc = {
|
||||
headers: headersc,
|
||||
};
|
||||
let fullUrl = "https://www.tabularium.pt/" + url;
|
||||
return this.http.get(fullUrl, optionsc).subscribe(()=>{
|
||||
this.fileService.viewDocumentByUrl(url)
|
||||
});
|
||||
}
|
||||
|
||||
getAllChannels(){
|
||||
return this.http.get(environment.apiChatUrl+'channels.list', this.options);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user