@@ -11,7 +11,7 @@ function makeUser (email = 'test@local') {
1111 email,
1212 verified : true ,
1313 created_at : '2020-01-01' ,
14- updated_at : '2020-01-01'
14+ updated_at : '2020-01-01' ,
1515 }
1616}
1717
@@ -25,21 +25,21 @@ const makeNewWiki = ({ domain, sitename }) => {
2525 updated_at : '2020-01-01' ,
2626 pivot : {
2727 user_id : user . id ,
28- wiki_id : lastWikiId
28+ wiki_id : lastWikiId ,
2929 } ,
3030 wiki_managers : [ {
3131 email : user . email ,
3232 pivot : {
3333 user_id : user . id ,
34- wiki_id : lastWikiId
35- }
34+ wiki_id : lastWikiId ,
35+ } ,
3636 } ] ,
3737 wiki_db_version : {
3838 id : 101 ,
3939 wiki_id : lastWikiId ,
40- version : 'mw1.33-wbs1'
40+ version : 'mw1.33-wbs1' ,
4141 } ,
42- public_settings : [ ]
42+ public_settings : [ ] ,
4343 }
4444
4545 myWikis . push ( newWiki )
@@ -59,12 +59,12 @@ const wikiDiscovery = (referrer, params) => {
5959 next : function ( ) {
6060 const x = Math . sin ( this . seed ++ ) * 10000
6161 return x - Math . floor ( x )
62- }
62+ } ,
6363 }
6464
6565 const names = [
6666 'Wikibase Name' ,
67- 'A Very Long Wikibase Name'
67+ 'A Very Long Wikibase Name' ,
6868 ]
6969
7070 let wikis = [ ...Array ( 75 ) . keys ( ) ] . map ( ( id ) => {
@@ -73,12 +73,12 @@ const wikiDiscovery = (referrer, params) => {
7373 domain : id + '-wikibase.wbaas.localhost' ,
7474 sitename : id + ' - ' + names [ id % names . length ] ,
7575 wiki_site_stats : null ,
76- logo_url : null
76+ logo_url : null ,
7777 }
7878
7979 if ( pseudorandom . next ( ) >= 0.1 ) {
8080 wiki . wiki_site_stats = {
81- pages : Math . ceil ( pseudorandom . next ( ) * 250 )
81+ pages : Math . ceil ( pseudorandom . next ( ) * 250 ) ,
8282 }
8383 }
8484
@@ -125,8 +125,8 @@ const wikiDiscovery = (referrer, params) => {
125125 data : wikis . slice ( start , end ) ,
126126 meta : {
127127 last_page : Math . ceil ( wikis . length / resultsPerPage ) ,
128- total : wikis . length
129- }
128+ total : wikis . length ,
129+ } ,
130130 }
131131}
132132
@@ -135,7 +135,7 @@ export const handlers = [
135135 rest . post ( / \/ a p i \/ a u t h \/ l o g i n $ / , ( req , res , ctx ) => {
136136 user = makeUser ( req . body . email )
137137 return res ( ctx . json ( {
138- user
138+ user,
139139 } ) , ctx . cookie ( 'authToken' , 'token_value' ) )
140140 } ) ,
141141 rest . get ( / \/ a p i \/ a u t h \/ l o g i n $ / , ( req , res , ctx ) => {
@@ -145,7 +145,7 @@ export const handlers = [
145145 }
146146 user = makeUser ( req . body . email )
147147 return res ( ctx . json ( {
148- user
148+ user,
149149 } ) )
150150 } ) ,
151151 rest . delete ( / \/ a p i \/ a u t h \/ l o g i n $ / , ( req , res , ctx ) => {
@@ -157,7 +157,7 @@ export const handlers = [
157157 return res ( ctx . status ( 400 , 'Mocked Server Error' ) )
158158 }
159159 return res ( ctx . status ( 200 ) )
160- }
160+ } ,
161161 ) ,
162162 rest . post ( / \/ a p i \/ u s e r \/ r e s e t P a s s w o r d $ / , ( _ , res , ctx ) => res ( ctx . status ( 200 ) ) ) ,
163163 rest . post ( / \/ a p i \/ u s e r \/ s e n d V e r i f y E m a i l $ / , ( _ , res , ctx ) => res ( ctx . json ( { message : 'Already verified' } ) ) ) ,
@@ -174,7 +174,7 @@ export const handlers = [
174174 return res ( ctx . status ( 400 , 'Mocked recaptcha empty Error' ) )
175175 }
176176 return res ( ctx . status ( 200 ) )
177- }
177+ } ,
178178 ) ,
179179
180180 /* Wiki endpoints */
@@ -219,5 +219,5 @@ export const handlers = [
219219 } ) ,
220220 rest . get ( / \/ a p i \/ w i k i $ / , ( req , res , ctx ) => {
221221 return res ( ctx . json ( wikiDiscovery ( req . referrer , req . url . searchParams ) ) )
222- } )
222+ } ) ,
223223]
0 commit comments