Skip to content

Commit

Permalink
#48 delete som log and and type
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcellino-Palerme committed Jun 24, 2024
1 parent 7bb2bdb commit 27a1d41
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
8 changes: 4 additions & 4 deletions components/ManageSerie.async.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ async function sendFile() {
rDaughterTable.value.push(
...result[1].map((r: [string, number]) => ({
idFile: result[0],
nameFile: daughterFile.value.name,
nameFile: daughterFile.value?.name || "error",
nameMeta: r[0],
area: r[1],
expectedArea: 0,
Expand All @@ -84,7 +84,7 @@ async function sendFile() {
rDaughterLoading.value = false;
}

async function submit (event) {
async function submit (event:SubmitEvent) {

// check if we have daughter solution
if (rDaughterTable.value.length === 0) {
Expand Down Expand Up @@ -114,14 +114,14 @@ async function submit (event) {
$fetch('/api/AddSerie', {
method: 'POST',
body: JSON.stringify({
nameSerie: event.target.elements.nameSerie.value,
nameSerie: event?.target?.elements?.nameSerie.value,
daughterGroup,
}),
})
.then(() => {
rUpload.value = !rUpload.value;
})
.catch((error) => {
.catch(() => {
// TODO: show error message
});
}
Expand Down
5 changes: 2 additions & 3 deletions server/api/function/RegSerie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export async function calculateRatioSerie(idSerie:string):Promise<number | {[key
WHERE id_series='${idSerie}'
`)
})
.then((res) => {
.then((res:{rows:any[]}) => {
// create array area/expected for each metabolite
const metaAreaExpected: {[key:string]:[number,number][]} = {}

Expand All @@ -43,8 +43,7 @@ export async function calculateRatioSerie(idSerie:string):Promise<number | {[key
}
return metaRatio
})
.catch((err) => {
console.error(err);
.catch(() => {
return 1;
})
.finally(() => {
Expand Down

0 comments on commit 27a1d41

Please sign in to comment.