mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 14:15:24 +00:00
chore: lock the plugin boundary and remove 2.9.0 leftovers
This commit is contained in:
1 parent
6489b62ece
commit
2961297989
399 files changed
+3964
-5627
No files matched your search
@@ -190,63 +190,3 @@ export async function adminDeleteUserCredential(
|
||||
throw handleApiError(error, "delete user's credential");
|
||||
}
|
||||
}
|
||||
|
||||
export async function adminGetUserSnippets(
|
||||
targetUserId: string,
|
||||
): Promise<Record<string, unknown>> {
|
||||
try {
|
||||
const response = await authApi.get("/plugin-api/snippets", {
|
||||
headers: adminHeaders(targetUserId),
|
||||
});
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
throw handleApiError(error, "fetch user's snippets");
|
||||
}
|
||||
}
|
||||
|
||||
export async function adminCreateUserSnippet(
|
||||
targetUserId: string,
|
||||
snippetData: Record<string, unknown>,
|
||||
): Promise<Record<string, unknown>> {
|
||||
try {
|
||||
const response = await authApi.post("/plugin-api/snippets", snippetData, {
|
||||
headers: adminHeaders(targetUserId),
|
||||
});
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
throw handleApiError(error, "create snippet for user");
|
||||
}
|
||||
}
|
||||
|
||||
export async function adminUpdateUserSnippet(
|
||||
targetUserId: string,
|
||||
snippetId: number,
|
||||
snippetData: Record<string, unknown>,
|
||||
): Promise<Record<string, unknown>> {
|
||||
try {
|
||||
const response = await authApi.put(
|
||||
`/plugin-api/snippets/${snippetId}`,
|
||||
snippetData,
|
||||
{
|
||||
headers: adminHeaders(targetUserId),
|
||||
},
|
||||
);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
throw handleApiError(error, "update user's snippet");
|
||||
}
|
||||
}
|
||||
|
||||
export async function adminDeleteUserSnippet(
|
||||
targetUserId: string,
|
||||
snippetId: number,
|
||||
): Promise<Record<string, unknown>> {
|
||||
try {
|
||||
const response = await authApi.delete(`/plugin-api/snippets/${snippetId}`, {
|
||||
headers: adminHeaders(targetUserId),
|
||||
});
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
throw handleApiError(error, "delete user's snippet");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user