11import { createCommand } from 'commander'
2- import { ApiOptions , limit } from 'jike-sdk'
2+ import { limit } from 'jike-sdk'
33import { logger } from '@poppinss/cliui'
44import { createClient , displayUser , filterUsers } from '../../utils/user'
55import { displayImage , printIfRaw , renderDivider } from '../../utils/terminal'
@@ -13,7 +13,7 @@ interface ListOptions {
1313
1414export const list = createCommand ( 'list' )
1515 . alias ( 'ls' )
16- . description ( 'feeds you are following ' )
16+ . description ( 'view posts of user ' )
1717 . argument ( '[username]' , 'the username of user' )
1818 // TODO interactive next page, lastKey
1919 . option ( '-c, --count <count>' , 'post max count' , '30' )
@@ -45,7 +45,7 @@ const listPosts = async (opts: ListOptions) => {
4545async function renderPost ( p : JikePostWithDetail ) {
4646 const detail = p . getDetail ( )
4747 const texts : string [ ] = [ ]
48- if ( p . type === ApiOptions . PostType . ORIGINAL ) {
48+ if ( detail . type === 'ORIGINAL_POST' ) {
4949 const link = isMacOS
5050 ? logger . colors . gray (
5151 logger . colors . underline ( `jike://page.jk/originalPost/${ p . id } ` )
0 commit comments