Auto-tag bot-protected clips with needs-reclip
This commit is contained in:
1 parent
906b18e7a6
commit
28d397dea3
2 files changed
+22
-3
No files matched your search
@@ -276,7 +276,11 @@ export async function POST(req: NextRequest) {
|
||||
stripHtmlToText(finalHtml).slice(0, 60).trim() ||
|
||||
(uploadedFiles[0]?.name ? `Attachment: ${uploadedFiles[0].name}` : 'Shared Note');
|
||||
|
||||
const tagIds = await getOrCreateTagIds(['inbox', 'share'], userId);
|
||||
const tagNames = ['inbox', 'share'];
|
||||
if (url && !text && uploadedFiles.length === 0) {
|
||||
tagNames.push('needs-reclip');
|
||||
}
|
||||
const tagIds = await getOrCreateTagIds(tagNames, userId);
|
||||
|
||||
const note = await prisma.note.create({
|
||||
data: {
|
||||
|
||||
Reference in new issue
Block a user