This repository was archived by the owner on Mar 19, 2021. It is now read-only.
File tree 3 files changed +53
-1
lines changed
3 files changed +53
-1
lines changed Original file line number Diff line number Diff line change
1
+ import agent from '../structures/agent'
2
+
3
+ const block = async ( profile , user ) => {
4
+ 'use strict'
5
+
6
+ const response = await agent (
7
+ '/block' ,
8
+ {
9
+ body : {
10
+ user_id : user || - 1
11
+ }
12
+ } ,
13
+ profile
14
+ )
15
+ const data = await response . json ( )
16
+
17
+ return data
18
+ }
19
+
20
+ export default block
21
+
22
+ export const specification = {
23
+ success : Boolean
24
+ }
Original file line number Diff line number Diff line change @@ -52,6 +52,8 @@ import getChannel from './getChannel'
52
52
import getNotifications from './getNotifications'
53
53
import getActionableNotifications from './getActionableNotifications'
54
54
import requestMobileAuthAgain from './requestMobileAuthAgain'
55
+ import block from './block'
56
+ import unblock from './unblock'
55
57
56
58
// NOTE: Externals
57
59
import getStatic from './getStatic'
@@ -111,5 +113,7 @@ export {
111
113
getChannel ,
112
114
getNotifications ,
113
115
getActionableNotifications ,
114
- requestMobileAuthAgain
116
+ requestMobileAuthAgain ,
117
+ block ,
118
+ unblock
115
119
}
Original file line number Diff line number Diff line change
1
+ import agent from '../structures/agent'
2
+
3
+ const unblock = async ( profile , user ) => {
4
+ 'use strict'
5
+
6
+ const response = await agent (
7
+ '/unblock' ,
8
+ {
9
+ body : {
10
+ user_id : user || - 1
11
+ }
12
+ } ,
13
+ profile
14
+ )
15
+ const data = await response . json ( )
16
+
17
+ return data
18
+ }
19
+
20
+ export default unblock
21
+
22
+ export const specification = {
23
+ success : Boolean
24
+ }
You can’t perform that action at this time.
0 commit comments