Compare commits

..

No commits in common. "503e8e34dd6471a6a0639fd4848119482ca1db45" and "cc5d482a0f3b47e9a0f7e433952c33d6a437a91f" have entirely different histories.

3 changed files with 2 additions and 15 deletions

1
.gitignore vendored
View File

@ -17,7 +17,6 @@ pnpm-debug.log*
.env
.env.production
config.json
certs/
# macOS-specific files
.DS_Store

View File

@ -6,17 +6,7 @@ import AccessToken from '../../types/AccessToken';
import locationManager from '../classes/managers/LocationManager';
export const createAccessToken = async (accessToken: AccessToken) => {
const formatted: DBAccessToken = {
_id: new ObjectId(),
type: accessToken.type,
user: accessToken.user?.id ?? new ObjectId(0),
entropy: accessToken.entropy,
createdAt: accessToken.createdAt,
expiresAt: accessToken.expiresAt ?? new Date(accessToken.createdAt.getTime() + 86400000),
createdFrom: accessToken.createdFrom
}
const newAccessToken = await (await AccessTokens()).insertOne(formatted);
const newAccessToken = await (await AccessTokens()).insertOne(accessToken);
return newAccessToken;
}

View File

@ -2,9 +2,7 @@ import { MongoClient } from "mongodb";
import config from '../../../config.json'
const uri = config.MONGODB_URI;
const options = {
tlsCertificateKeyFile: config.MONGODB_CERT
};
const options = {};
const mongo = new MongoClient(uri, options);