File tree Expand file tree Collapse file tree 4 files changed +14
-14
lines changed Expand file tree Collapse file tree 4 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -31,28 +31,28 @@ export const getSeriesTitle = ($seriesPage: SeriesPage): string => {
3131 return $seriesPage ( "h2.heading" ) . text ( ) . trim ( ) ;
3232} ;
3333
34- export const getSeriesCreators = (
34+ export const getSeriesAuthors = (
3535 $seriesPage : SeriesPage
36- ) : Series [ "creators " ] => {
37- const creatorLinks = $seriesPage ( "dl.meta a[rel=author]" ) ;
38- const creators : Author [ ] = [ ] ;
36+ ) : Series [ "authors " ] => {
37+ const authorLinks = $seriesPage ( "dl.meta a[rel=author]" ) ;
38+ const authors : Author [ ] = [ ] ;
3939
4040 if (
4141 $seriesPage ( "dl.meta > dd:nth-of-type(1)" ) . text ( ) . trim ( ) === "Anonymous"
4242 ) {
4343 return "Anonymous" ;
4444 }
4545
46- if ( creatorLinks . length !== 0 ) {
47- creatorLinks . each ( ( i , element ) => {
46+ if ( authorLinks . length !== 0 ) {
47+ authorLinks . each ( ( i , element ) => {
4848 const url = element . attribs . href ;
4949 const [ , username , pseud ] = url . match ( / u s e r s \/ ( .+ ) \/ p s e u d s \/ ( .+ ) / ) ! ;
5050
51- creators . push ( { username : username , pseud : decodeURI ( pseud ) } ) ;
51+ authors . push ( { username : username , pseud : decodeURI ( pseud ) } ) ;
5252 } ) ;
5353 }
5454
55- return creators ;
55+ return authors ;
5656} ;
5757
5858export const getSeriesDescription = (
Original file line number Diff line number Diff line change 11import { loadSeriesPage } from "src/page-loaders" ;
22import { Series } from "types/entities" ;
33import {
4- getSeriesCreators ,
4+ getSeriesAuthors ,
55 getSeriesBookmarkCount ,
66 getSeriesCompletionStatus ,
77 getSeriesDescription ,
@@ -27,9 +27,9 @@ export const getSeries = async ({
2727 return {
2828 id : seriesId ,
2929 name : getSeriesTitle ( seriesPage ) ,
30- begunAt : getSeriesPublishDate ( seriesPage ) ,
30+ startedAt : getSeriesPublishDate ( seriesPage ) ,
3131 updatedAt : getSeriesUpdateDate ( seriesPage ) ,
32- creators : getSeriesCreators ( seriesPage ) ,
32+ authors : getSeriesAuthors ( seriesPage ) ,
3333 description : getSeriesDescription ( seriesPage ) ,
3434 notes : getSeriesNotes ( seriesPage ) ,
3535 words : getSeriesWordCount ( seriesPage ) ,
Original file line number Diff line number Diff line change @@ -375,7 +375,7 @@ describe("Fetches series information", () => {
375375
376376 test ( "Fetches author with username Anonymous" , async ( ) => {
377377 const series = await getSeries ( { seriesId : "2946579" } ) ;
378- expect ( series . creators ) . toBe ( "Anonymous" ) ;
378+ expect ( series . authors ) . toBe ( "Anonymous" ) ;
379379 } ) ;
380380
381381 describe ( "Fetches series title" , ( ) => {
Original file line number Diff line number Diff line change @@ -50,9 +50,9 @@ export interface SeriesWorkSummary
5050export interface Series {
5151 id : string ;
5252 name : string ;
53- begunAt : string ;
53+ startedAt : string ;
5454 updatedAt : string ;
55- creators : WorkSummary [ "authors" ] ;
55+ authors : WorkSummary [ "authors" ] ;
5656 description : string | null ;
5757 notes : string | null ;
5858 words : number ;
You can’t perform that action at this time.
0 commit comments