mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
fix(backend): seed reports
This commit is contained in:
parent
9e4b2d18c4
commit
3451a16ab4
@ -1100,7 +1100,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
|||||||
huey.relateTo(p9, 'shouted'),
|
huey.relateTo(p9, 'shouted'),
|
||||||
louie.relateTo(p10, 'shouted'),
|
louie.relateTo(p10, 'shouted'),
|
||||||
])
|
])
|
||||||
|
|
||||||
const reports = await Promise.all([
|
const reports = await Promise.all([
|
||||||
Factory.build('report'),
|
Factory.build('report'),
|
||||||
Factory.build('report'),
|
Factory.build('report'),
|
||||||
@ -1113,32 +1113,31 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
|||||||
const reportAgainstDewey = reports[3]
|
const reportAgainstDewey = reports[3]
|
||||||
|
|
||||||
// report resource first time
|
// report resource first time
|
||||||
await Promise.all([
|
|
||||||
reportAgainstDagobert.relateTo(jennyRostock, 'filed', {
|
await reportAgainstDagobert.relateTo(jennyRostock, 'filed', {
|
||||||
resourceId: 'u7',
|
resourceId: 'u7',
|
||||||
reasonCategory: 'discrimination_etc',
|
reasonCategory: 'discrimination_etc',
|
||||||
reasonDescription: 'This user is harassing me with bigoted remarks!',
|
reasonDescription: 'This user is harassing me with bigoted remarks!',
|
||||||
}),
|
})
|
||||||
reportAgainstDagobert.relateTo(dagobert, 'belongsTo'),
|
await reportAgainstDagobert.relateTo(dagobert, 'belongsTo')
|
||||||
reportAgainstTrollingPost.relateTo(jennyRostock, 'filed', {
|
await reportAgainstTrollingPost.relateTo(jennyRostock, 'filed', {
|
||||||
resourceId: 'p2',
|
resourceId: 'p2',
|
||||||
reasonCategory: 'doxing',
|
reasonCategory: 'doxing',
|
||||||
reasonDescription: "This shouldn't be shown to anybody else! It's my private thing!",
|
reasonDescription: "This shouldn't be shown to anybody else! It's my private thing!",
|
||||||
}),
|
})
|
||||||
reportAgainstTrollingPost.relateTo(p2, 'belongsTo'),
|
await reportAgainstTrollingPost.relateTo(p2, 'belongsTo')
|
||||||
reportAgainstTrollingComment.relateTo(huey, 'filed', {
|
await reportAgainstTrollingComment.relateTo(huey, 'filed', {
|
||||||
resourceId: 'c1',
|
resourceId: 'c1',
|
||||||
reasonCategory: 'other',
|
reasonCategory: 'other',
|
||||||
reasonDescription: 'This comment is bigoted',
|
reasonDescription: 'This comment is bigoted',
|
||||||
}),
|
})
|
||||||
reportAgainstTrollingComment.relateTo(trollingComment, 'belongsTo'),
|
await reportAgainstTrollingComment.relateTo(trollingComment, 'belongsTo')
|
||||||
reportAgainstDewey.relateTo(dagobert, 'filed', {
|
await reportAgainstDewey.relateTo(dagobert, 'filed', {
|
||||||
resourceId: 'u5',
|
resourceId: 'u5',
|
||||||
reasonCategory: 'discrimination_etc',
|
reasonCategory: 'discrimination_etc',
|
||||||
reasonDescription: 'This user is harassing me!',
|
reasonDescription: 'This user is harassing me!',
|
||||||
}),
|
})
|
||||||
reportAgainstDewey.relateTo(dewey, 'belongsTo'),
|
await reportAgainstDewey.relateTo(dewey, 'belongsTo')
|
||||||
])
|
|
||||||
|
|
||||||
// report resource a second time
|
// report resource a second time
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user