Renaming all co-occurring to overlapping, easier to spell. Filtering by only overlapping tags when searching by a tag, this is because any non-overlapping will not produce results anyways.

This commit is contained in:
Roland 2026-03-07 15:43:11 -07:00
parent 3d74b4bcfc
commit f59a4198d9
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
6 changed files with 203 additions and 83 deletions

View file

@ -1487,12 +1487,17 @@ export async function getEvents(after) {
return response
}
export async function getTags() {
const uri = `${API_URI}/tag`;
export async function getTags(tagNames) {
let uri = `${API_URI}/tag`;
if (tagNames && tagNames.length > 0) {
const params = new URLSearchParams();
(typeof tagNames === 'string' ? [tagNames] : tagNames).forEach(name => params.append('tag_names', name));
uri = `${uri}?${params.toString()}`;
}
const response = await apiGet(uri);
if (response.ok) {
const body = await response.json();
return body['tags'];
return body;
}
// Not toasting because this happens often.
return response
@ -1508,15 +1513,6 @@ export async function getRecentTags() {
return [];
}
export async function getCooccurringTags(tagName) {
const uri = `${API_URI}/tag/cooccurring/${encodeURIComponent(tagName)}`;
const response = await apiGet(uri);
if (response.ok) {
const body = await response.json();
return body['tag_names'] || [];
}
return [];
}
export async function tagFileGroup(fileGroup, name) {
const body = {tag_name: name};