Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
bacfc437f9 | |||
ce9b765b81 | |||
2ab6e985e3 |
@ -2,9 +2,17 @@
|
||||
|
||||
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
|
||||
|
||||
#### [1.3.12](https://git.odit.services/lfk/backend/compare/1.3.11...1.3.12)
|
||||
|
||||
- refactor: make Donation.donor optional [`2ab6e98`](https://git.odit.services/lfk/backend/commit/2ab6e985e356f0f3d8637d81630d191cc11b8806)
|
||||
- refactor(config): improve consola error logs [`ce9b765`](https://git.odit.services/lfk/backend/commit/ce9b765b81b014623e79ce64d8d835f1f86cecf3)
|
||||
|
||||
#### [1.3.11](https://git.odit.services/lfk/backend/compare/1.3.10...1.3.11)
|
||||
|
||||
> 17 April 2025
|
||||
|
||||
- feat(RunnerController): add selfservice_links parameter to getRunners method [`a50d72f`](https://git.odit.services/lfk/backend/commit/a50d72f2f5281b8c28ca64a0970161a35a7af95a)
|
||||
- chore(release): 1.3.11 [`d06f6a4`](https://git.odit.services/lfk/backend/commit/d06f6a44072971d1853411b255f9b49eb423b3a2)
|
||||
|
||||
#### [1.3.10](https://git.odit.services/lfk/backend/compare/1.3.9...1.3.10)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@odit/lfk-backend",
|
||||
"version": "1.3.11",
|
||||
"version": "1.3.12",
|
||||
"main": "src/app.ts",
|
||||
"repository": "https://git.odit.services/lfk/backend",
|
||||
"author": {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import consola from 'consola';
|
||||
import { config as configDotenv } from 'dotenv';
|
||||
import { CountryCode } from 'libphonenumber-js';
|
||||
import ValidatorJS from 'validator';
|
||||
@ -20,12 +21,15 @@ export const config = {
|
||||
}
|
||||
let errors = 0
|
||||
if (typeof config.internal_port !== "number") {
|
||||
consola.error("Error: APP_PORT is not a number")
|
||||
errors++
|
||||
}
|
||||
if (typeof config.development !== "boolean") {
|
||||
consola.error("Error: NODE_ENV is not a boolean")
|
||||
errors++
|
||||
}
|
||||
if (config.mailer_url == "" || config.mailer_key == "") {
|
||||
consola.error("Error: invalid mailer config")
|
||||
errors++;
|
||||
}
|
||||
function getPhoneCodeLocale(): CountryCode {
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { IsInt, IsOptional, IsPositive } from 'class-validator';
|
||||
import { getConnection } from 'typeorm';
|
||||
import { DonorNotFoundError } from '../../../errors/DonorErrors';
|
||||
import { Donation } from '../../entities/Donation';
|
||||
import { Donor } from '../../entities/Donor';
|
||||
|
||||
@ -14,6 +13,7 @@ export abstract class CreateDonation {
|
||||
*/
|
||||
@IsInt()
|
||||
@IsPositive()
|
||||
@IsOptional()
|
||||
donor: number;
|
||||
|
||||
/**
|
||||
@ -33,9 +33,6 @@ export abstract class CreateDonation {
|
||||
*/
|
||||
public async getDonor(): Promise<Donor> {
|
||||
const donor = await getConnection().getRepository(Donor).findOne({ id: this.donor });
|
||||
if (!donor) {
|
||||
throw new DonorNotFoundError();
|
||||
}
|
||||
return donor;
|
||||
}
|
||||
}
|
@ -1,6 +1,5 @@
|
||||
import {
|
||||
IsInt,
|
||||
IsNotEmpty
|
||||
IsInt
|
||||
} from "class-validator";
|
||||
import { Column, Entity, ManyToOne, PrimaryGeneratedColumn, TableInheritance } from "typeorm";
|
||||
import { ResponseDonation } from '../responses/ResponseDonation';
|
||||
@ -24,7 +23,6 @@ export abstract class Donation {
|
||||
/**
|
||||
* The donations's donor.
|
||||
*/
|
||||
@IsNotEmpty()
|
||||
@ManyToOne(() => Donor, donor => donor.donations)
|
||||
donor: Donor;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user