Skip to content

Commit 9f571e1

Browse files
authored
Update README.md
1 parent 2838bbc commit 9f571e1

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

README.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ const sync = new Sync()
129129
130130
## Function Details
131131
132-
### sync.add(table, path, options)
132+
### Synchronization
133+
134+
#### sync.add(table, path, options)
133135
134136
Starts the synchronization to and from remote. Multiple browser windows are supported.
135137
@@ -151,37 +153,41 @@ A local table can be synchronized with only one remote table.
151153
152154
A remote table can be synchronized with one or more local tables.
153155
154-
### sync.emptyTable(table)
156+
#### sync.emptyTable(table)
155157
156158
Removes all records from a local table without synchronizing them as deleted to the server.
157159
158160
- `table`: [Dexie.js Table](https://dexie.org/docs/Dexie/Dexie.%5Btable%5D)
159161
160-
### sync.reset()
162+
#### sync.reset()
161163
162164
Resets all synchronizations. All local and remote documents are synchronized again.
163165
164166
- `database`: [Dexie.js Database](https://dexie.org/docs/Dexie/Dexie)
165167
166-
### sync.register(username, password)
168+
### Authentication
169+
170+
See: [Database Authentication Documentation](https://github.com/mevdschee/php-crud-api?tab=readme-ov-file#database-authentication) for the PHP CRUD API
171+
172+
#### sync.register(username, password)
167173
168174
Creates a new user.
169175
170-
### sync.login(username, password)
176+
#### sync.login(username, password)
171177
172178
Logs the user in, clears all local tables and resets the synchronization.
173179
174-
### sync.password(username, password, newPassword)
180+
#### sync.password(username, password, newPassword)
175181
176182
Updates the password of the user.
177183
178-
### sync.user(callback)
184+
#### sync.user(callback)
179185
180186
Returns the use details or null.
181187
182188
- `callback`: `<function>` *optional*, callback on any user change with user details or null
183189
184-
### sync.logout()
190+
#### sync.logout()
185191
186192
Logs the user out, clears all local tables and resets the synchronization.
187193

0 commit comments

Comments
 (0)