fix
This commit is contained in:
@@ -113,7 +113,7 @@ export class FrontblockAdmin extends ConfigLoader<AdminConf>{
|
|||||||
const loadedPlugins = this.pm.getLoadedPlugins()
|
const loadedPlugins = this.pm.getLoadedPlugins()
|
||||||
for(const name in loadedPlugins){
|
for(const name in loadedPlugins){
|
||||||
loadedPlugins[name].backend.exportRPCs().forEach(rpc => {
|
loadedPlugins[name].backend.exportRPCs().forEach(rpc => {
|
||||||
const info = this.rpcToRpcInfo(name=="admin"?"Pluginmanager":name, rpc)
|
const info = this.rpcToRpcInfo(name=="admin"?"PluginManager":name, rpc)
|
||||||
rpcInfos.push(info)
|
rpcInfos.push(info)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -124,12 +124,16 @@ export default class PluginManager extends ConfigLoader<PluginManagerConfig&Plug
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async getLatestVersion(pluginName:string):Promise<SemVer>{
|
private async getLatestVersion(pluginName:string):Promise<SemVer>{
|
||||||
|
if(pluginName === this.name) pluginName = "admin"
|
||||||
|
|
||||||
const latest = await this.getLatestRelease(pluginName)
|
const latest = await this.getLatestRelease(pluginName)
|
||||||
const version = latest.tag_name
|
const version = latest.tag_name
|
||||||
return parse(version)!
|
return parse(version)!
|
||||||
}
|
}
|
||||||
|
|
||||||
async downloadPlugin(pluginName: string) {
|
async downloadPlugin(pluginName: string) {
|
||||||
|
if(pluginName === this.name) pluginName = "admin"
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let version = await this.getLatestVersion(pluginName)
|
let version = await this.getLatestVersion(pluginName)
|
||||||
logger.info(version)
|
logger.info(version)
|
||||||
|
|||||||
Reference in New Issue
Block a user