mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-04 08:08:55 +01:00 
			
		
		
		
	refactor: don't need device id.
This commit is contained in:
		@@ -25,8 +25,7 @@ class SyncYomiSyncService(
 | 
			
		||||
    override suspend fun pushSyncData(): SyncData? {
 | 
			
		||||
        val host = syncPreferences.syncHost().get()
 | 
			
		||||
        val apiKey = syncPreferences.syncAPIKey().get()
 | 
			
		||||
        val deviceId = syncPreferences.deviceID().get()
 | 
			
		||||
        val downloadUrl = "$host/api/sync/download?deviceId=$deviceId"
 | 
			
		||||
        val downloadUrl = "$host/api/sync/download"
 | 
			
		||||
 | 
			
		||||
        val client = OkHttpClient()
 | 
			
		||||
        val headers = Headers.Builder().add("X-API-Token", apiKey).build()
 | 
			
		||||
 
 | 
			
		||||
@@ -14,7 +14,5 @@ class SyncPreferences(
 | 
			
		||||
 | 
			
		||||
    fun deviceName() = preferenceStore.getString("device_name", android.os.Build.MANUFACTURER + android.os.Build.PRODUCT)
 | 
			
		||||
 | 
			
		||||
    fun deviceID() = preferenceStore.getInt("device_id", 0)
 | 
			
		||||
 | 
			
		||||
    fun syncService() = preferenceStore.getInt("sync_service", 0)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user