mirror of
https://github.com/woodchen-ink/aimodels-prices.git
synced 2025-07-18 05:32:00 +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')
|
||||
.then(response => response.json())
|
||||
.then((data: Price[]) => {
|
||||
.then(data => {
|
||||
tbody.innerHTML = '';
|
||||
|
||||
if (!data || !Array.isArray(data)) {
|
||||
@ -542,9 +542,9 @@ const html = `<!DOCTYPE html>
|
||||
return;
|
||||
}
|
||||
|
||||
data.forEach((price: Price) => {
|
||||
data.forEach(price => {
|
||||
const tr = document.createElement('tr');
|
||||
const safePrice: Price = {
|
||||
const safePrice = {
|
||||
...price,
|
||||
input_ratio: price.input_ratio || 1,
|
||||
output_ratio: price.output_ratio || 1,
|
||||
|
Loading…
x
Reference in New Issue
Block a user