HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-172-31-4-197 6.8.0-1036-aws #38~22.04.1-Ubuntu SMP Fri Aug 22 15:44:33 UTC 2025 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/web.enelar.com.co/dist/browser/chunk-O2KABI6C.js
import{a as c}from"./chunk-J5MNQ3LA.js";import{A as s,Ab as m,h as a,x as p,yb as u}from"./chunk-MDSVL5BJ.js";var o=class r{static fromApiToDomain(t){return{data:Array.isArray(t.data)?t.data.map(d=>r.dataMapper(d)):r.dataMapper(t.data),message:t.message,summary:t.summary,totalRecords:t.totalRecords,rows:t.rows}}static dataMapper(t){return{_id:t._id,portada:t.portada,titulo:t.titulo,contenido:t.contenido,publicar:t.publicar,fechaPublicacion:t.fechaPublicacion,createdAt:t.createdAt}}static fromDomainToApi(t){return{_id:t._id,portada:t.portada,titulo:t.titulo,contenido:t.contenido,publicar:t.publicar,fechaPublicacion:t.fechaPublicacion,createdAt:t.createdAt}}};var l=(()=>{let t=class t{constructor(i){this.http=i}addNoticia(i){return this.http.post(`${c.apiDevWeb}noticias`,i).pipe(a(o.fromApiToDomain))}getNoticias(i,e,n=!1){let f=new u().set("page",i.toString()).set("pageSize",e.toString());return this.http.get(`${c.apiDevWeb}${n?"public/":""}noticias`,{params:f}).pipe(a(o.fromApiToDomain))}getNoticia(i){return this.http.get(`${c.apiDevWeb}noticias/${i}`).pipe(a(o.fromApiToDomain))}updateNoticia(i,e){let n=o.fromDomainToApi(i);return this.http.put(`${c.apiDevWeb}noticias/${e}`,n).pipe(a(o.fromApiToDomain))}deleteOneNoticia(i){return this.http.delete(`${c.apiDevWeb}noticias/${i}`).pipe(a(o.fromApiToDomain))}deleteMultiNoticias(i){return this.http.post(`${c.apiDevWeb}noticias/eliminar-varios`,i).pipe(a(o.fromApiToDomain))}};t.\u0275fac=function(e){return new(e||t)(s(m))},t.\u0275prov=p({token:t,factory:t.\u0275fac,providedIn:"root"});let r=t;return r})();var $=(()=>{let t=class t{constructor(i){this.noticiaService=i}addNoticia(i){return this.noticiaService.addNoticia(i)}getNoticias(i,e,n){return this.noticiaService.getNoticias(i,e,n)}getNoticia(i){return this.noticiaService.getNoticia(i)}updateNoticia(i,e){return this.noticiaService.updateNoticia(i,e)}deleteOneNoticia(i){return this.noticiaService.deleteOneNoticia(i)}deleteMultiNoticias(i){return this.noticiaService.deleteMultiNoticias(i)}};t.\u0275fac=function(e){return new(e||t)(s(l))},t.\u0275prov=p({token:t,factory:t.\u0275fac,providedIn:"root"});let r=t;return r})();export{$ as a};