File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -81,4 +81,40 @@ module.exports = class FastPanel {
8181 reject ( res )
8282 } ) ;
8383 }
84+
85+ domains ( ) {
86+ return new Promise ( async ( resolve , reject ) => {
87+ const res = await this . _get ( 'api/dns/domains' ) ;
88+ if ( res ) resolve ( res ) ;
89+
90+ reject ( res )
91+ } ) ;
92+ }
93+
94+ domain ( id ) {
95+ return new Promise ( async ( resolve , reject ) => {
96+ const res = await this . _get ( `api/dns/domain/${ id } /records` ) ;
97+ if ( res ) resolve ( res ) ;
98+
99+ reject ( res )
100+ } ) ;
101+ }
102+
103+ sites ( limit = 30 ) {
104+ return new Promise ( async ( resolve , reject ) => {
105+ const res = await this . _get ( `api/sites/list?filter[limit]=${ limit } &filter[type]=all&filter[offset]=0` ) ;
106+ if ( res ) resolve ( res ) ;
107+
108+ reject ( res )
109+ } ) ;
110+ }
111+
112+ site ( id ) {
113+ return new Promise ( async ( resolve , reject ) => {
114+ const res = await this . _get ( `api/sites/${ id } ` ) ;
115+ if ( res ) resolve ( res ) ;
116+
117+ reject ( res )
118+ } ) ;
119+ }
84120}
You can’t perform that action at this time.
0 commit comments