Build failure fixes
All checks were successful
Automated Container Build / build-and-push (push) Successful in 1m21s

This commit is contained in:
Elijah 2026-05-24 10:51:19 -07:00
parent d80e31e7f5
commit 6a754808b5
3 changed files with 16 additions and 6 deletions

View file

@ -26,8 +26,9 @@ export default function OfficeHome({ type, onFileSelect, onCreateBlank }: Office
useEffect(() => {
// Fetch all files from root directory (as a simple way to find recent files of this type)
// Or we could use a search endpoint. For now we will fetch the root directory and filter.
api.listFiles('.')
.then(files => {
api.listDirectory('.')
.then(data => {
const files: FileItem[] = data.files || [];
const ext = type === 'docs' ? '.docx' : '.pptx';
const filtered = files
.filter(f => !f.is_dir && f.name.endsWith(ext) && !f.is_trashed)
@ -44,8 +45,8 @@ export default function OfficeHome({ type, onFileSelect, onCreateBlank }: Office
const handleCreateBlank = async () => {
try {
const res = await api.client.post('/onlyoffice/create', { type: type === 'docs' ? 'word' : 'slide' });
const { path, name } = res.data;
const res = await api.createOnlyOfficeFile(type === 'docs' ? 'word' : 'slide');
const { path, name } = res;
const newFile: FileItem = {
name,