[feat] Optional recursive
This commit is contained in:
5
.idea/.idea.Abyss/.idea/workspace.xml
generated
5
.idea/.idea.Abyss/.idea/workspace.xml
generated
@@ -11,6 +11,7 @@
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="bf317275-3039-49bb-a475-725a800a0cce" name="Changes" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/.idea.Abyss/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.Abyss/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Abyss/Components/Controllers/Security/RootController.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Abyss/Components/Controllers/Security/RootController.cs" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@@ -223,6 +224,10 @@
|
||||
<workItem from="1758121232981" duration="69000" />
|
||||
<workItem from="1758279286341" duration="6796000" />
|
||||
<workItem from="1758303096075" duration="2560000" />
|
||||
<workItem from="1758307172642" duration="157000" />
|
||||
<workItem from="1758307433345" duration="34000" />
|
||||
<workItem from="1758344749532" duration="238000" />
|
||||
<workItem from="1758345893755" duration="2662000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
|
||||
@@ -11,7 +11,7 @@ public class RootController(ILogger<RootController> logger, UserService userServ
|
||||
: BaseController
|
||||
{
|
||||
[HttpPost("chmod")]
|
||||
public async Task<IActionResult> Chmod(string token, string path, string permission)
|
||||
public async Task<IActionResult> Chmod(string token, string path, string permission, string? recursive)
|
||||
{
|
||||
logger.LogInformation("Chmod method called with path: {Path}, permission: {Permission}", path, permission);
|
||||
|
||||
@@ -21,13 +21,13 @@ public class RootController(ILogger<RootController> logger, UserService userServ
|
||||
return StatusCode(401, "Unauthorized");
|
||||
}
|
||||
|
||||
bool r = await resourceService.Chmod(path, token, permission, Ip, true);
|
||||
bool r = await resourceService.Chmod(path, token, permission, Ip, recursive == "true");
|
||||
logger.LogInformation("Chmod operation completed with result: {Result}", r);
|
||||
return r ? Ok() : StatusCode(502);
|
||||
}
|
||||
|
||||
[HttpPost("chown")]
|
||||
public async Task<IActionResult> Chown(string token, string path, int owner)
|
||||
public async Task<IActionResult> Chown(string token, string path, int owner, string? recursive)
|
||||
{
|
||||
logger.LogInformation("Chown method called with path: {Path}, owner: {Owner}", path, owner);
|
||||
|
||||
@@ -37,7 +37,7 @@ public class RootController(ILogger<RootController> logger, UserService userServ
|
||||
return StatusCode(401, "Unauthorized");
|
||||
}
|
||||
|
||||
bool r = await resourceService.Chown(path, token, owner, Ip, true);
|
||||
bool r = await resourceService.Chown(path, token, owner, Ip, recursive == "true");
|
||||
logger.LogInformation("Chown operation completed with result: {Result}", r);
|
||||
return r ? Ok() : StatusCode(502);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user