Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 0 additions & 43 deletions server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"jsonwebtoken": "^9.0.2",
"multer": "^2.1.1",
"node-cron": "^4.2.1",
"node-fetch": "^2.7.0",
"nodemailer": "^8.0.4",
"otplib": "^12.0.1",
"qrcode": "^1.5.4",
Expand Down
2 changes: 1 addition & 1 deletion server/src/routes/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import path from 'path';
import fs from 'fs';
import crypto from 'crypto';
import { v4 as uuid } from 'uuid';
import fetch from 'node-fetch';

import { authenticator } from 'otplib';
import QRCode from 'qrcode';
import { db } from '../db/database';
Expand Down
3 changes: 1 addition & 2 deletions server/src/routes/collab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -493,11 +493,10 @@ router.get('/link-preview', authenticate, async (req: Request, res: Response) =>
return res.status(400).json({ error: 'Private/internal URLs are not allowed' });
}

const nodeFetch = require('node-fetch');
const controller = new AbortController();
const timeout = setTimeout(() => controller.abort(), 5000);

nodeFetch(url, { redirect: 'error',
fetch(url, { redirect: 'error',
signal: controller.signal,
headers: { 'User-Agent': 'Mozilla/5.0 (compatible; NOMAD/1.0; +https://github.com/mauriceboe/NOMAD)' },
})
Expand Down
2 changes: 1 addition & 1 deletion server/src/routes/maps.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import express, { Request, Response } from 'express';
import fetch from 'node-fetch';

import { db } from '../db/database';
import { authenticate } from '../middleware/auth';
import { AuthRequest } from '../types';
Expand Down
2 changes: 1 addition & 1 deletion server/src/routes/oidc.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import express, { Request, Response } from 'express';
import crypto from 'crypto';
import fetch from 'node-fetch';

import jwt from 'jsonwebtoken';
import { db } from '../db/database';
import { JWT_SECRET } from '../config';
Expand Down
2 changes: 1 addition & 1 deletion server/src/routes/places.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import express, { Request, Response } from 'express';
import fetch from 'node-fetch';

import multer from 'multer';
import { db, getPlaceWithTags } from '../db/database';
import { authenticate } from '../middleware/auth';
Expand Down
5 changes: 4 additions & 1 deletion server/src/routes/weather.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import express, { Request, Response } from 'express';
import fetch from 'node-fetch';
import dns from 'dns';
import { authenticate } from '../middleware/auth';

const router = express.Router();

// Force IPv4 to prevent ETIMEDOUT on Docker bridge networks where IPv6 is unroutable.
dns.setDefaultResultOrder('ipv4first');

interface WeatherResult {
temp: number;
temp_max?: number;
Expand Down
2 changes: 1 addition & 1 deletion server/src/services/notifications.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import nodemailer from 'nodemailer';
import fetch from 'node-fetch';

import { db } from '../db/database';

// ── Types ──────────────────────────────────────────────────────────────────
Expand Down