mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
fix(backend): Obfuscate avatar/image fix test
- Then Image.url can be non-nullable because we return null if the resource is deleted.
This commit is contained in:
parent
e0e026a8b8
commit
698c85b262
@ -17,10 +17,10 @@ const obfuscate = async (resolve, root, args, context, info) => {
|
||||
root.contentExcerpt = 'UNAVAILABLE'
|
||||
root.title = 'UNAVAILABLE'
|
||||
root.slug = 'UNAVAILABLE'
|
||||
root.avatar = 'UNAVAILABLE'
|
||||
root.avatar = null
|
||||
root.about = 'UNAVAILABLE'
|
||||
root.name = 'UNAVAILABLE'
|
||||
root.image = null // avoid unecessary 500 errors
|
||||
root.image = null
|
||||
}
|
||||
return resolve(root, args, context, info)
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@ import Resolver from './helpers/Resolver'
|
||||
export default {
|
||||
Image: {
|
||||
...Resolver('Image', {
|
||||
undefinedToNull: ['sensitive', 'alt', 'aspectRatio', 'url'],
|
||||
undefinedToNull: ['sensitive', 'alt', 'aspectRatio'],
|
||||
}),
|
||||
},
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
type Image {
|
||||
url: ID,
|
||||
url: ID!,
|
||||
# urlW34: String,
|
||||
# urlW160: String,
|
||||
# urlW320: String,
|
||||
|
||||
@ -201,7 +201,6 @@ type Query {
|
||||
title: String
|
||||
slug: String
|
||||
content: String
|
||||
image: String
|
||||
visibility: Visibility
|
||||
pinned: Boolean
|
||||
createdAt: String
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user