Tiny web app fixes
parent
04b7b4284a
commit
ed0c1abd2f
|
@ -21,8 +21,11 @@ class Api {
|
|||
const headers = maybeWithAuth({}, user);
|
||||
console.log(`[Api] Polling ${url}`);
|
||||
for await (let line of fetchLinesIterator(url, headers)) {
|
||||
console.log(`[Api, ${shortUrl}] Received message ${line}`);
|
||||
messages.push(JSON.parse(line));
|
||||
const message = JSON.parse(line);
|
||||
if (message.id) {
|
||||
console.log(`[Api, ${shortUrl}] Received message ${line}`);
|
||||
messages.push(message);
|
||||
}
|
||||
}
|
||||
return messages;
|
||||
}
|
||||
|
|
|
@ -541,8 +541,8 @@ const ReservationsTable = (props) => {
|
|||
const [deleteDialogOpen, setDeleteDialogOpen] = useState(false);
|
||||
const { subscriptions } = useOutletContext();
|
||||
const localSubscriptions = (subscriptions?.length > 0)
|
||||
? Object.assign(...subscriptions.filter(s => s.baseUrl === config.base_url).map(s => ({[s.topic]: s})))
|
||||
: [];
|
||||
? Object.assign({}, ...subscriptions.filter(s => s.baseUrl === config.base_url).map(s => ({[s.topic]: s})))
|
||||
: {};
|
||||
|
||||
const handleEditClick = (reservation) => {
|
||||
setDialogKey(prev => prev+1);
|
||||
|
|
|
@ -34,7 +34,7 @@ export const ReserveAddDialog = (props) => {
|
|||
const handleSubmit = async () => {
|
||||
try {
|
||||
await accountApi.upsertReservation(topic, everyone);
|
||||
console.debug(`[ReserveAddDialog] Added reservation for topic ${t}: ${everyone}`);
|
||||
console.debug(`[ReserveAddDialog] Added reservation for topic ${topic}: ${everyone}`);
|
||||
} catch (e) {
|
||||
console.log(`[ReserveAddDialog] Error adding topic reservation.`, e);
|
||||
if (e instanceof UnauthorizedError) {
|
||||
|
|
Loading…
Reference in New Issue