mirror of
https://github.com/timokz/flutter-vienna-hackathon-25.git
synced 2025-11-08 19:04:20 +01:00
type quote stream
This commit is contained in:
parent
8967b1698e
commit
642dddaaa3
1 changed files with 1 additions and 2 deletions
|
|
@ -54,7 +54,6 @@ class QuoteEndpoint extends Endpoint {
|
|||
throw Exception('Quote not found');
|
||||
}
|
||||
|
||||
// Only for dev
|
||||
Future<List<Quote>> getAllQuotes(Session session) async {
|
||||
final quotes = await Quote.db.find(session);
|
||||
return quotes;
|
||||
|
|
@ -66,7 +65,7 @@ class QuoteEndpoint extends Endpoint {
|
|||
}) async* {
|
||||
if (limit <= 0 || limit > 500) limit = 200;
|
||||
|
||||
final quoteStream = session.messages.createStream('quotes');
|
||||
final quoteStream = session.messages.createStream<Quote>('quotes');
|
||||
|
||||
await for (final Quote quote in quoteStream) {
|
||||
yield quote;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue