12 changed files with 103 additions and 62 deletions
@ -0,0 +1,16 @@ |
|||
<?php |
|||
@include 'conn.conn'; |
|||
$GLOBALS['conn']; |
|||
$conn=@mysqli_connect($DATAhst,$DATAusr,$DATApwd,$DATAdtb)or die("CONNECTION ERROR"); |
|||
|
|||
$content = null; |
|||
$content->imageUrl = 'http://unsplash.it/800/600'; |
|||
|
|||
header("Access-Control-Allow-Origin: *"); |
|||
header("Content-Type: application/json; charset=UTF-8"); |
|||
header("Access-Control-Allow-Methods: POST"); |
|||
header("Access-Control-Max-Age: 3600"); |
|||
|
|||
echo json_encode($content); |
|||
|
|||
?> |
@ -1,16 +0,0 @@ |
|||
import { TestBed } from '@angular/core/testing'; |
|||
|
|||
import { AuthService } from './auth.service'; |
|||
|
|||
describe('AuthService', () => { |
|||
let service: AuthService; |
|||
|
|||
beforeEach(() => { |
|||
TestBed.configureTestingModule({}); |
|||
service = TestBed.inject(AuthService); |
|||
}); |
|||
|
|||
it('should be created', () => { |
|||
expect(service).toBeTruthy(); |
|||
}); |
|||
}); |
@ -1,27 +0,0 @@ |
|||
import { Injectable } from '@angular/core' |
|||
import { HttpClient, HttpHeaders, HttpParams, HttpRequest } from '@angular/common/http' |
|||
import { Observable, Subject, throwError } from 'rxjs' |
|||
import { catchError } from 'rxjs/operators' |
|||
import { BaseService } from './base-service' |
|||
import { environment } from '../../environments/environment' |
|||
|
|||
@Injectable({ |
|||
providedIn: 'root' |
|||
}) |
|||
export class AuthService extends BaseService { |
|||
|
|||
private restApi = `${environment.API_URL}` |
|||
|
|||
constructor(private http: HttpClient) { |
|||
super() |
|||
} |
|||
|
|||
login(body): Observable<any> { |
|||
let urlApi = `${this.restApi}auth.php` |
|||
return this.http.post<any>(urlApi, body).pipe( |
|||
catchError(this.handleError) |
|||
) |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,52 @@ |
|||
|
|||
import { AngularEditorConfig } from '@kolkov/angular-editor' |
|||
|
|||
export const editorConfig: AngularEditorConfig = { |
|||
editable: true, |
|||
spellcheck: true, |
|||
height: '200px', |
|||
translate: 'no', |
|||
enableToolbar: true, |
|||
showToolbar: true, |
|||
placeholder: 'Enter text here...', |
|||
defaultParagraphSeparator: '', |
|||
defaultFontName: 'Abel', |
|||
defaultFontSize: '', |
|||
uploadUrl: 'http://dslakng.local/apis/upload.php', |
|||
uploadWithCredentials: false, |
|||
sanitize: true, |
|||
toolbarPosition: 'top', |
|||
toolbarHiddenButtons: [ |
|||
[ |
|||
'undo', |
|||
'redo', |
|||
//'bold',
|
|||
//'italic',
|
|||
//'underline',
|
|||
'strikeThrough', |
|||
'subscript', |
|||
'superscript', |
|||
//'justifyLeft',
|
|||
//'justifyCenter',
|
|||
//'justifyRight',
|
|||
//'justifyFull',
|
|||
'indent', |
|||
'outdent', |
|||
'insertUnorderedList', |
|||
'insertOrderedList', |
|||
'heading', |
|||
'fontName', |
|||
'fontSize', |
|||
'textColor', |
|||
'backgroundColor', |
|||
'customClasses', |
|||
//'link',
|
|||
'unlink', |
|||
//'insertImage',
|
|||
'insertVideo', |
|||
'insertHorizontalRule', |
|||
//'removeFormat',
|
|||
//'toggleEditorMode'
|
|||
] |
|||
] |
|||
} |
@ -1,5 +1,4 @@ |
|||
export const environment = { |
|||
production: true, |
|||
|
|||
API_URL: `https://apis.dslak.it/` |
|||
} |
|||
|
@ -1,5 +1,4 @@ |
|||
export const environment = { |
|||
production: false, |
|||
|
|||
API_URL: `http://dslakng.local/apis/` |
|||
} |
|||
|
Loading…
Reference in new issue