Skip to content

Commit

Permalink
fix(CITAS): cambia url feriados en actualizarAgendasJobs (#1902)
Browse files Browse the repository at this point in the history
  • Loading branch information
MCele committed May 21, 2024
1 parent ad2eeec commit e449e2a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions config.private.ts.example
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ export const mongooseDebugMode = false;
// Swagger config
export const enableSwagger = false;

export const diasNoLaborables = 'https://nolaborables.com.ar/api/v2/feriados/';

// Configuración de Google Geocoding
export const geoKey = getEnv('GOOGLE_MAP_KEY', 'GOOGLE_MAP_KEY');
export const geocodingPaths = {
Expand Down
4 changes: 2 additions & 2 deletions modules/turnos/controller/agenda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Types } from 'mongoose';
import * as request from 'request';
import { Auth } from '../../../auth/auth.class';
import { logKeys } from '../../../config';
import { userScheduler } from '../../../config.private';
import { userScheduler, diasNoLaborables } from '../../../config.private';
import { SnomedCtr } from '../../../core/term/controller/snomed.controller';
import { NotificationService } from '../../../modules/mobileApp/controller/NotificationService';
import { toArray } from '../../../utils/utils';
Expand Down Expand Up @@ -661,7 +661,7 @@ function esFeriado(fecha) {
const anio = moment(fecha).year();
const mes = moment(fecha).month(); // de 0 a 11
const dia = moment(fecha).date(); // de 1 a 31
const url = 'https://nolaborables.com.ar/api/v2/feriados/' + anio;
const url = diasNoLaborables + anio;

request({ url, json: true }, (err, response, body) => {
if (err) {
Expand Down

0 comments on commit e449e2a

Please sign in to comment.