Beispiel #1
0
async def post(payload: SummaryPayloadSchema) -> int:
    summary = TextSummary(
        url=payload.url,
        summary="dummy summary",
    )
    await summary.save()
    return summary.id
Beispiel #2
0
async def post(payload: SummaryPayloadSchema) -> int:
    """
    post creates a new summary in db, given a valid payload
    """
    summary = TextSummary(url=payload.url, summary="")
    await summary.save()
    return summary.id
Beispiel #3
0
async def create(url: str, timeframe: str, topic: str, category: str,
                 uid: UUID) -> int:
    summary = TextSummary(url=url,
                          timeFrame=timeframe,
                          topic=topic,
                          category=category,
                          uid=uid,
                          summary="")
    await summary.save()
    return summary.id
Beispiel #4
0
async def post(payload: SummaryPayloadSchema) -> int:
    summary = TextSummary(url=payload.url, summary=article_summary)
    await summary.save()
    return summary.id
Beispiel #5
0
async def post(payload: SummaryPayloadSchema) -> int:
    summary = TextSummary(url=payload.url, title="", summary="")
    await summary.save()
    return summary.id