@@ -5,19 +5,18 @@ import axios from 'axios';
55
66export class XylobyteAPI {
77 static getHardSkills = async ( ) : Promise < HardSkills > =>
8- await fetchData ( 'https ://api.xylobyte.com /v1/website/hardskills' ) ;
8+ await fetchData ( 'http ://127.0.0.1:3000 /v1/website/hardskills' ) ;
99
1010 static getSoftSkills = async ( ) : Promise < SoftSkill [ ] > =>
11- await fetchData ( 'https ://api.xylobyte.com /v1/website/softskills' ) ;
11+ await fetchData ( 'http ://127.0.0.1:3000 /v1/website/softskills' ) ;
1212
1313 static getLanguagesSkills = async ( ) : Promise < LanguageSkill [ ] > =>
14- await fetchData ( 'https ://api.xylobyte.com /v1/website/languages-skills' ) ;
14+ await fetchData ( 'http ://127.0.0.1:3000 /v1/website/languages-skills' ) ;
1515
16- static getProjects = async ( ) : Promise < Project [ ] > =>
17- await fetchData ( 'https://api.xylobyte.com/v1/website/projects' ) ;
16+ static getProjects = async ( ) : Promise < Project [ ] > => await fetchData ( 'http://127.0.0.1:3000/v1/website/projects' ) ;
1817
1918 static sendContactRequest = async ( data : ContactRequestData ) => {
20- const response = await fetch ( 'https ://api.xylobyte.com /v1/website/contact' , {
19+ const response = await fetch ( 'http ://127.0.0.1:3000 /v1/website/contact' , {
2120 body : JSON . stringify ( data ) ,
2221 method : 'POST' ,
2322 cache : 'no-cache' ,
@@ -37,7 +36,11 @@ export class XylobyteAPI {
3736 } ;
3837
3938 static getTexts = async ( lang : string ) : Promise < XylobyteText [ ] > =>
40- await fetchData ( `https://api.xylobyte.com/v1/website/texts?lang=${ lang } ` ) ;
39+ await fetchData ( `http://127.0.0.1:3000/v1/website/texts?lang=${ lang } ` ) ;
40+
41+ static logAccess = async ( ) => {
42+ await axios . post ( 'http://127.0.0.1:3000/v1/admin/access-stats/portfolio' ) ;
43+ } ;
4144}
4245
4346const fetchData = async ( url : string ) => {
0 commit comments