mirror of
https://github.com/woodchen-ink/aimodels-prices.git
synced 2025-07-19 14:11:59 +08:00
Remove TypeScript type annotations in frontend price data handling
This commit is contained in:
parent
edc374fc61
commit
2d0565c72e
6
main.ts
6
main.ts
@ -534,7 +534,7 @@ const html = `<!DOCTYPE html>
|
|||||||
|
|
||||||
fetch('/api/prices')
|
fetch('/api/prices')
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then((data: Price[]) => {
|
.then(data => {
|
||||||
tbody.innerHTML = '';
|
tbody.innerHTML = '';
|
||||||
|
|
||||||
if (!data || !Array.isArray(data)) {
|
if (!data || !Array.isArray(data)) {
|
||||||
@ -542,9 +542,9 @@ const html = `<!DOCTYPE html>
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
data.forEach((price: Price) => {
|
data.forEach(price => {
|
||||||
const tr = document.createElement('tr');
|
const tr = document.createElement('tr');
|
||||||
const safePrice: Price = {
|
const safePrice = {
|
||||||
...price,
|
...price,
|
||||||
input_ratio: price.input_ratio || 1,
|
input_ratio: price.input_ratio || 1,
|
||||||
output_ratio: price.output_ratio || 1,
|
output_ratio: price.output_ratio || 1,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user