enhance(data-usage): remove GA timing report on fetch note json (MisskeyIO#849)

This commit is contained in:
あわわわとーにゅ 2024-12-25 13:02:32 +09:00 committed by GitHub
parent 36e238197e
commit 5073467f1d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -78,7 +78,6 @@ async function prepend(data) {
//
// idOnlyid
if (!data.visibility) {
const initiateTime = Date.now();
const res = await window.fetch(`/notes/${data.id}.json`, {
method: 'GET',
credentials: 'omit',
@ -86,15 +85,6 @@ async function prepend(data) {
'Authorization': 'anonymous',
'X-Client-Transaction-Id': generateClientTransactionId('misskey'),
},
}).then(res => {
if (instance.googleAnalyticsId) {
gtagTime({
name: 'api-get',
event_category: `/notes/${data.id}.json`,
value: Date.now() - initiateTime,
});
}
return res;
});
if (!res.ok) return;
note = await res.json();