File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/routes/tools/[toolId] Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -97,15 +97,15 @@ export const actions: Actions = {
97
97
envPublic . PUBLIC_SHARE_PREFIX || `${ envPublic . PUBLIC_ORIGIN || url . origin } ${ base } ` ;
98
98
const toolUrl = `${ prefixUrl } /tools/${ params . toolId } ` ;
99
99
100
- const tool = await collections . tools . findOne < Pick < Tool , "displayName" > > (
100
+ const tool = await collections . tools . findOne < Pick < Tool , "displayName" | "name" > > (
101
101
{ _id : new ObjectId ( params . toolId ) } ,
102
- { projection : { displayName : 1 } }
102
+ { projection : { displayName : 1 , name : 1 } }
103
103
) ;
104
104
105
105
const username = locals . user ?. username ;
106
106
107
107
await sendSlack (
108
- `🔴 Tool <${ toolUrl } |${ tool ?. displayName } > reported by ${
108
+ `🔴 Tool <${ toolUrl } |${ tool ?. displayName ?? tool ?. name } > reported by ${
109
109
username ? `<http://hf.co/${ username } |${ username } >` : "non-logged in user"
110
110
} .\n\n> ${ result . data } `
111
111
) ;
You can’t perform that action at this time.
0 commit comments