mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Fix lint
This commit is contained in:
parent
0529e2b2b0
commit
f68e289016
@ -34,7 +34,7 @@ export default {
|
||||
type: r.get('type')
|
||||
}
|
||||
})
|
||||
if(!dbResponse) return null
|
||||
if (!dbResponse) return null
|
||||
const { report, submitter, resource, type } = dbResponse
|
||||
|
||||
let response = {
|
||||
@ -45,16 +45,16 @@ export default {
|
||||
submitter: submitter.properties,
|
||||
type
|
||||
}
|
||||
switch(type){
|
||||
case "Post":
|
||||
response.post = resource.properties
|
||||
break;
|
||||
case "Comment":
|
||||
response.comment = resource.properties
|
||||
break;
|
||||
case "User":
|
||||
response.user = resource.properties
|
||||
break;
|
||||
switch (type) {
|
||||
case 'Post':
|
||||
response.post = resource.properties
|
||||
break
|
||||
case 'Comment':
|
||||
response.comment = resource.properties
|
||||
break
|
||||
case 'User':
|
||||
response.user = resource.properties
|
||||
break
|
||||
}
|
||||
return response
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ describe('report', () => {
|
||||
|
||||
describe('valid resource id', () => {
|
||||
beforeEach(async () => {
|
||||
variables = {id: 'u2'}
|
||||
variables = { id: 'u2' }
|
||||
})
|
||||
|
||||
it('creates a report', async () => {
|
||||
@ -98,8 +98,8 @@ describe('report', () => {
|
||||
|
||||
describe('reported resource is a post', () => {
|
||||
beforeEach(async () => {
|
||||
await factory.authenticateAs({email: 'test@example.org', password: '1234'})
|
||||
await factory.create('Post', {id: 'p23', title: 'Matt and Robert having a pair-programming' })
|
||||
await factory.authenticateAs({ email: 'test@example.org', password: '1234' })
|
||||
await factory.create('Post', { id: 'p23', title: 'Matt and Robert having a pair-programming' })
|
||||
variables = { id: 'p23' }
|
||||
})
|
||||
|
||||
@ -127,8 +127,8 @@ describe('report', () => {
|
||||
|
||||
describe('reported resource is a comment', () => {
|
||||
beforeEach(async () => {
|
||||
await factory.authenticateAs({email: 'test@example.org', password: '1234'})
|
||||
await factory.create('Comment', {id: 'c34', content: 'Robert getting tired.' })
|
||||
await factory.authenticateAs({ email: 'test@example.org', password: '1234' })
|
||||
await factory.create('Comment', { id: 'c34', content: 'Robert getting tired.' })
|
||||
variables = { id: 'c34' }
|
||||
})
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user