unshare
This commit is contained in:
parent
dff4831a81
commit
a01e45b2b0
18
app/nose/bin/unshare.ts
Normal file
18
app/nose/bin/unshare.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { apps } from "app/src/webapp"
|
||||
import { disconnectSneaker, sneakers } from "app/src/sneaker"
|
||||
|
||||
export default async function (app: string) {
|
||||
if (!app) {
|
||||
return "usage: unshare <app>"
|
||||
}
|
||||
|
||||
if (!apps().includes(app)) {
|
||||
return { error: `${app} not found` }
|
||||
}
|
||||
|
||||
if (!sneakers().includes(app)) {
|
||||
return { error: `${app} not shared` }
|
||||
}
|
||||
|
||||
return (await disconnectSneaker(app)) ? "unshared" : `${app} wasn't shared`
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user