|
@@ -76,4 +76,15 @@ class User extends Controller {
|
|
|
return json(['l'=>$info]);
|
|
|
}
|
|
|
|
|
|
+ public function delete(){
|
|
|
+ $data = decode($this->request->post());
|
|
|
+
|
|
|
+ $short = $data['s'];
|
|
|
+
|
|
|
+ $path = "load/$short.txt";
|
|
|
+ $res = unlink($path);
|
|
|
+
|
|
|
+ return json(['r'=>(($res)?1:0)]);
|
|
|
+ }
|
|
|
+
|
|
|
}
|