Skip to content

Commit

Permalink
change function paramater reassignment to ternary bc lint
Browse files Browse the repository at this point in the history
  • Loading branch information
theimperious1 committed Oct 13, 2024
1 parent 34c01c5 commit a9f2ba9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/global/commands/g.idose.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { drug_mass_unit, drug_roa } from '@prisma/client';
import { $Enums, drug_mass_unit, drug_roa } from '@prisma/client';
import {
time,
} from 'discord.js';
Expand Down Expand Up @@ -147,17 +147,13 @@ async function iDoseSet(
update: {},
});

if (units.toString() === 'µG') {
units = 'MICRO_G';
}

await db.user_drug_doses.create({
data: {
user_id: userData.id,
drug_id: drugId,
route: roa,
dose: volume,
units,
units: units.toString() === 'µG' ? $Enums.drug_mass_unit.MICRO_G : units,
created_at: date,
},
});
Expand Down

0 comments on commit a9f2ba9

Please sign in to comment.