|
1 | 1 | import asyncio
|
2 | 2 | from uuid import UUID
|
3 | 3 |
|
4 |
| -from quart import Blueprint, json, jsonify, make_response, render_template, request |
5 |
| -from quart_auth import current_user |
| 4 | +from quart import Blueprint, jsonify, make_response, render_template, request |
| 5 | +from quart_auth import current_user, login_required |
6 | 6 | from tortoise.exceptions import DoesNotExist
|
7 | 7 |
|
8 | 8 | from ..database import crud
|
@@ -181,7 +181,7 @@ async def note_prefix(notebook_uuid, note_uuid):
|
181 | 181 | return "invalid notebook/user/note", 404
|
182 | 182 |
|
183 | 183 |
|
184 |
| -@blueprint.route("/notebook/<notebook_uuid>/notes/<note_uuid>/auto-save", methods=["PATCH"]) |
| 184 | +@blueprint.route("/notebook/<notebook_uuid>/notes/<note_uuid>/auto-save", methods=["POST"]) |
185 | 185 | @api_login_required
|
186 | 186 | async def note_auto_save(notebook_uuid, note_uuid):
|
187 | 187 | try:
|
@@ -217,8 +217,8 @@ async def note_auto_save(notebook_uuid, note_uuid):
|
217 | 217 | return "missing required params", 400
|
218 | 218 |
|
219 | 219 |
|
220 |
| -@blueprint.route("/notebook/<notebook_uuid>/notes/<note_uuid>/save", methods=["PATCH"]) |
221 |
| -@api_login_required |
| 220 | +@blueprint.route("/notebook/<notebook_uuid>/notes/<note_uuid>/save", methods=["POST"]) |
| 221 | +@login_required |
222 | 222 | async def note_save(notebook_uuid, note_uuid):
|
223 | 223 | try:
|
224 | 224 | notebook_uuid = UUID(notebook_uuid)
|
|
0 commit comments